mirror of
https://github.com/ole00/afterburner.git
synced 2024-11-04 08:04:56 +00:00
Use library functions for memcpy from flash
This commit is contained in:
parent
e335ee638f
commit
79594dc863
@ -598,16 +598,7 @@ void setup() {
|
||||
|
||||
//copy galinfo item from the flash array into RAM backed struct
|
||||
static void copyGalInfo(void) {
|
||||
uint8_t* src = (uint8_t*) &galInfoList[gal];
|
||||
uint8_t* dst = (uint8_t*) &galinfo;
|
||||
uint8_t total = sizeof(galinfo_t);
|
||||
uint8_t i = 0;
|
||||
while (i < total) {
|
||||
*dst = pgm_read_byte(src);
|
||||
dst++;
|
||||
src++;
|
||||
i++;
|
||||
}
|
||||
memcpy_P(&galinfo, &galInfoList[gal], sizeof(galinfo_t));
|
||||
}
|
||||
|
||||
// read from serial line and discard the data
|
||||
|
Loading…
Reference in New Issue
Block a user