51 typedef uint8_t(*u8_fp_u16)(uint16_t);
56 #define flash_put(DATA,ADDRESS) _Generic((DATA), \ 57 char: FLASHWRITE_write_c, \ 58 uint8_t: FLASHWRITE_write_u8, \ 59 int8_t: FLASHWRITE_write_8, \ 60 uint16_t: FLASHWRITE_write_u16, \ 61 int16_t: FLASHWRITE_write_16, \ 62 uint32_t: FLASHWRITE_write_u32, \ 63 int32_t: FLASHWRITE_write_32, \ 64 float: FLASHWRITE_write_float, \ 65 default: FLASHWRITE_write_u8 \ 70 #define flash_get(DATA,ADDRESS) _Generic((DATA), \ 71 char*: FLASHWRITE_read_c, \ 72 uint8_t*: FLASHWRITE_read_u8, \ 73 int8_t*: FLASHWRITE_read_8, \ 74 uint16_t*: FLASHWRITE_read_u16, \ 75 int16_t*: FLASHWRITE_read_16, \ 76 uint32_t*: FLASHWRITE_read_u32, \ 77 int32_t*: FLASHWRITE_read_32, \ 78 float*: FLASHWRITE_read_float, \ 79 default: FLASHWRITE_read_u8 \ uint16_t FLASHWRITE_write_float(float data, uint16_t address)
Write a float to address given.
uint16_t FLASHWRITE_write_c(char data, uint16_t address)
Write a char to address given.
uint16_t FLASHWRITE_write_16(int16_t data, uint16_t address)
Write a signed 16 bit integer to address give.
uint16_t FLASHWRITE_write_u16(uint16_t data, uint16_t address)
Write a unsigned 16 bit integer to address given.
void FLASHWRITE_setInput(uint8_t(*in)(uint16_t))
Set the target input stream for flash_get functions.
uint16_t FLASHWRITE_read_8(int8_t *data, uint16_t address)
Read a signed 8 bit integer from address given.
v_fp_u8_u16 FLASHWRITE_getOutput(void)
Get the current target output stream.
uint16_t FLASHWRITE_write_32(int32_t data, uint16_t address)
Write a signed 32 bit integer to address given.
void(* v_fp_u8_u16)(uint8_t, uint16_t)
Function pointer typedef for void function with uint8_t parameter.
uint16_t FLASHWRITE_write_8(int8_t data, uint16_t address)
Write a signed 8 bit integer to address given.
uint16_t FLASHWRITE_read_32(int32_t *data, uint16_t address)
Read a signed 32 bit integer from address given.
void FLASHWRITE_setOutput(void(*out)(uint8_t, uint16_t))
Set the target output stream for flash_put functions.
uint16_t FLASHWRITE_read_u16(uint16_t *data, uint16_t address)
Read a unsigned 16 bit integer from address give.
u8_fp_u16 FLASHWRITE_getInput(void)
Get the current target input stream.
uint16_t FLASHWRITE_read_16(int16_t *data, uint16_t address)
Read a signed 16 bit integer from address give.
uint16_t FLASHWRITE_write_u8(uint8_t data, uint16_t address)
Write a unsigned 8 bit integer to address given.
uint16_t FLASHWRITE_write_u32(uint32_t data, uint16_t address)
Write a unsigned 32 bit integer to address given.
uint16_t FLASHWRITE_read_u32(uint32_t *data, uint16_t address)
Read a unsigned 32 bit integer from address given.
uint16_t FLASHWRITE_read_u8(uint8_t *data, uint16_t address)
Read a unsigned 8 bit integer from address given.
uint16_t FLASHWRITE_read_float(float *data, uint16_t address)
Read a float from address given.
uint16_t FLASHWRITE_read_c(char *data, uint16_t address)
Read a char from address give.