Subversion Repositories FlightCtrl

Rev

Rev 2106 | Rev 2122 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2106 Rev 2116
Line 145... Line 145...
145
 
145
 
146
/***************************************************/
146
/***************************************************/
147
/* ChannelMap                                      */
147
/* ChannelMap                                      */
148
/***************************************************/
148
/***************************************************/
149
void channelMap_writeToEEProm(void) {
149
void channelMap_writeToEEProm(void) {
150
  writeChecksummedBlock(CHANNELMAP_REVISION, (uint8_t*)&channelMap, EEPROM_ADR_CHANNELMAP, sizeof(channelMap_t));
150
  writeChecksummedBlock(CHANNELMAP_REVISION, (uint8_t*)&channelMap, EEPROM_ADR_CHANNELMAP, sizeof(ChannelMap_t));
Line 151... Line 151...
151
}
151
}
152
 
152
 
153
void channelMap_readOrDefault(void) {
153
void channelMap_readOrDefault(void) {
154
  if (readChecksummedBlock(CHANNELMAP_REVISION, (uint8_t*)&channelMap, EEPROM_ADR_CHANNELMAP, sizeof(channelMap_t))) {
154
  if (readChecksummedBlock(CHANNELMAP_REVISION, (uint8_t*)&channelMap, EEPROM_ADR_CHANNELMAP, sizeof(ChannelMap_t))) {
155
    printf("\n\rwriting default channel map");
155
    printf("\n\rwriting default channel map");
156
    channelMap_default();
156
    channelMap_default();
157
    channelMap_writeToEEProm();
157
    channelMap_writeToEEProm();