post
poster: Thetawaves
description: Don't you wish you could write such beautiful code?
language: C
[download]
1
2
3
4
5
6
7
8
9
10
void blank_eventlist_eeprom()
{
    char tmp[sizeof(mucron_t)] = {0};
    
    uint8_t index;
    for (index = 0; index < EVENTLIST_SIZE; index++)
    {
        EEPROM_write_page(offsetof(struct s_config, EventList) + sizeof(mucron_t) * index, tmp, sizeof(mucron_t) );
    }
}