mirror of
https://github.com/ole00/afterburner.git
synced 2024-06-17 13:29:37 +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
|
//copy galinfo item from the flash array into RAM backed struct
|
||||||
static void copyGalInfo(void) {
|
static void copyGalInfo(void) {
|
||||||
uint8_t* src = (uint8_t*) &galInfoList[gal];
|
memcpy_P(&galinfo, &galInfoList[gal], sizeof(galinfo_t));
|
||||||
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++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// read from serial line and discard the data
|
// read from serial line and discard the data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user