/*#*
*#* $Log$
+ *#* Revision 1.7 2007/06/08 14:25:43 batt
+ *#* Merge from project_ks.
+ *#*
*#* Revision 1.6 2006/07/19 12:56:28 bernie
*#* Convert to new Doxygen style.
*#*
SeekFunc_t seek;
/* NOTE: these must _NOT_ be size_t on 16bit CPUs! */
- uint32_t SeekPos;
- uint32_t Size;
+ uint32_t seek_pos;
+ uint32_t size;
} KFile;
#endif /* MWARE_KFILE_H */
); \
__result; \
})
- #if 0 // 128/103
- #define pgm_read_uint16_t(addr) \
- ({ \
- uint32_t __addr32 = (uint32_t)(addr); \
- uint16_t __result; \
- __asm__ \
- ( \
- "out %2, %C1" "\n\t" \
- "movw r30, %1" "\n\t" \
- "elpm %A0, Z+" "\n\t" \
- "elpm %B0, Z" "\n\t" \
- : "=r" (__result) \
- : "r" (__addr32), \
- "I" (_SFR_IO_ADDR(RAMPZ)) \
- : "r30", "r31" \
- ); \
- __result; \
- })
- #endif
-
#define pgm_read_uint16_t(addr) \
({ \
uint16_t __addr16 = (uint16_t)(addr); \
); \
__result; \
})
- #if 0 // 128/103
- #define pgm_read_uint16_t(addr) \
- ({ \
- uint32_t __addr32 = (uint32_t)(addr); \
- uint16_t __result; \
- __asm__ \
- ( \
- "out %2, %C1" "\n\t" \
- "mov r31, %B1" "\n\t" \
- "mov r30, %A1" "\n\t" \
- "elpm" "\n\t" \
- "mov %A0, r0" "\n\t" \
- "in r0, %2" "\n\t" \
- "adiw r30, 1" "\n\t" \
- "adc r0, __zero_reg__" "\n\t" \
- "out %2, r0" "\n\t" \
- "elpm" "\n\t" \
- "mov %B0, r0" "\n\t" \
- : "=r" (__result) \
- : "r" (__addr32), \
- "I" (_SFR_IO_ADDR(RAMPZ)) \
- : "r0", "r30", "r31" \
- ); \
- __result; \
- })
- #endif
#define pgm_read_uint16_t(addr) \
({ \
uint16_t __addr16 = (uint16_t)(addr); \