main: minor, improve code
This commit is contained in:
parent
a8f80dc3fd
commit
28cf5160d8
4
main.c
4
main.c
|
@ -33,12 +33,12 @@ bool (*ram_eeprom_blockprog)(const uint8_t* data, uint16_t length);
|
||||||
volatile uint8_t RAM_SEG_LEN;
|
volatile uint8_t RAM_SEG_LEN;
|
||||||
|
|
||||||
// get the size of the RAM segment
|
// get the size of the RAM segment
|
||||||
inline void get_ram_section_length() {
|
static inline void get_ram_section_length() {
|
||||||
__asm__("mov _RAM_SEG_LEN, #l_RAM_SEG");
|
__asm__("mov _RAM_SEG_LEN, #l_RAM_SEG");
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy functions to RAM
|
// copy functions to RAM
|
||||||
bool ram_cpy() {
|
static bool ram_cpy() {
|
||||||
get_ram_section_length();
|
get_ram_section_length();
|
||||||
if (RAM_SEG_LEN > ARRAY_LENGTH(f_ram)) {
|
if (RAM_SEG_LEN > ARRAY_LENGTH(f_ram)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue