用户工具

站点工具


reference:language:progmem

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

后一修订版
前一修订版
reference:language:progmem [2017/05/18 23:04]
弘毅 创建
reference:language:progmem [2017/05/18 23:21] (当前版本)
行 1: 行 1:
 ====== PROGMEM ====== ====== PROGMEM ======
  
 +将数据存储在Flash存储器中,而不是SRAM。 ​
  
-Store data in flash (program) memory instead of SRAM. There'​s a description of the various types of memory available on an Arduino board.+PROGMEM关键字是一个变量修饰符,它只能用于pgmspace.h中定义的数据类型。它告诉编译器“把这些信息放入Flash”,而不是平时放入的SRAM
  
-The PROGMEM ​keyword is a variable modifier, it should be used only with the datatypes defined in pgmspace.h. It tells the compiler "put this information into flash memory",​ instead of into SRAM, where it would normally go. +PROGMEM仅是AVR GCC的pgmspace.h库的一部分。所以你首先需要添加一行代码,如下所示:
- +
-PROGMEM is part of the pgmspace.h library that is available in the AVR architecture only. So you first need to include the library at the top your sketch, like this:+
  
 <​code>​ <​code>​
reference/language/progmem.txt · 最后更改: 2017/05/18 23:21 (外部编辑)