Coder Social home page Coder Social logo

Comments (3)

armink avatar armink commented on August 23, 2024

贴出更多代码吧

from easyflash.

zengwangfa avatar zengwangfa commented on August 23, 2024

这个地址我还未写入数据,但是我想知道:
还未写入数据的地址,如果去读取,返回的数据应该是什么样的数据?

因为我读取Flash设置了一个简单的自检去判断 数据是否正确,当判断数据 不为(-1)时则为正常数据,但是可能这个 打印出来的(-1)并不是真正的 数值上的(-1),这个简单的判断并不能成立。

/* 读取 FLASH 普通参数*/
int Normal_Paramter_Init_With_Flash(void)
{
	char i = 0;
	for(i = 0;i < PARAMEMER_MAX_NUMBER_A;i++ ){
		ef_port_read(Nor_FLASH_ADDRESS+4*i,(u32 *)(&Normal_Parameter[i]),4);		
	}
	Normal_Parameter_SelfCheck_With_Flash();//Flash参数自检 若为 0 或 -1则为 非正常数据,则不传递给真实数据 
	log_i("Flash_Read()");
	return 0;
}

from easyflash.

armink avatar armink commented on August 23, 2024
  • 1、 ef_port_read 不是给用户调用的,是由用户适配好,提供给 EasyFlash 使用的
  • 2、即便你去调用这个接口,他的出参是 EfErrCode 类型,不应该是 -1

EfErrCode ef_port_read(uint32_t addr, uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
EF_ASSERT(size % 4 == 0);
/* You can add your code under here. */
return result;

from easyflash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.