- unsigned int fill(unsigned int *buf, unsigned int pos, const char __attribute__((progmem)) *progmem_s)
- {
- char c;
- while ((c = pgm_read_byte(progmem_s++)))
- {
- buf[0x33 + 3 + pos] = c;
- pos++;
- }
- return(pos);
- }
复制代码上面是AVR代码,我想progmem可以不用吧,直接SRAM运行,那么如何修改?我改这个明显错了.
- unsigned int fill(unsigned int *buf, unsigned int pos, const char *progmem_s)
- {
- char c;
- while (c = progmem_s++)
- {
- buf[0x33 + 3 + pos] = c;
- pos++;
- }
- return(pos);
- }
复制代码
一周热门 更多>