2 #include "../firmware.h"
6 #define UART_INTERFACE UART_CAMERA
10 uint32_t written, read;
18 UART_puts(UART_INTERFACE,
"\r\nEEPROM Demo\r\n");
24 UART_puts(UART_INTERFACE,
"\r\nSelftest: FAIL\r\n");
28 UART_puts(UART_INTERFACE,
"\r\nSelftest: OK\r\n");
34 written =
Random(UINT_MAX-1);
37 sprintf(output,
"Written: 0x%08lx\r\n", written);
42 sprintf(output,
"Read: 0x%08lx\r\n", read);
void Delay_ms(uint32_t milliseconds)
void EEPROM_write(uint32_t address, uint32_t *data, uint32_t length)
bool EEPROM_selfTest(void)
void UART_init(uint8_t uart_num, uint32_t baudrate)
uint32_t Random(uint32_t max)
void EEPROM_read(uint32_t address, uint32_t *data, uint32_t length)
void LED_off(uint8_t led_num)
int main(void)
Runs all module tests.
void UART_puts(uint8_t uart_num, char *str)
void LED_on(uint8_t led_num)