From: Keith Packard Date: Sun, 19 Apr 2009 06:19:24 +0000 (-0700) Subject: Start using pdata area for less-frequently used data X-Git-Tag: sn1-flight1 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=5be13b76a2e29b84cd6d1eec065e3354b0dafce5;ds=sidebyside Start using pdata area for less-frequently used data --- diff --git a/ao_dbg.c b/ao_dbg.c index f7b292f3..f493acc5 100644 --- a/ao_dbg.c +++ b/ao_dbg.c @@ -106,7 +106,7 @@ __xdata uint8_t save_dpl1; __xdata uint8_t save_dph1; static uint8_t -ao_dbg_inst1(uint8_t a) +ao_dbg_inst1(uint8_t a) __reentrant { ao_dbg_send_byte(DEBUG_INSTR(1)); ao_dbg_send_byte(a); @@ -114,7 +114,7 @@ ao_dbg_inst1(uint8_t a) } static uint8_t -ao_dbg_inst2(uint8_t a, uint8_t b) +ao_dbg_inst2(uint8_t a, uint8_t b) __reentrant { ao_dbg_send_byte(DEBUG_INSTR(2)); ao_dbg_send_byte(a); @@ -123,7 +123,7 @@ ao_dbg_inst2(uint8_t a, uint8_t b) } static uint8_t -ao_dbg_inst3(uint8_t a, uint8_t b, uint8_t c) +ao_dbg_inst3(uint8_t a, uint8_t b, uint8_t c) __reentrant { ao_dbg_send_byte(DEBUG_INSTR(3)); ao_dbg_send_byte(a); diff --git a/ao_ee.c b/ao_ee.c index 8dbb5e83..ea127c12 100644 --- a/ao_ee.c +++ b/ao_ee.c @@ -170,9 +170,9 @@ ao_ee_wrsr(uint8_t status) #define EE_BLOCK_NONE 0xffff -__xdata uint8_t ao_ee_data[EE_BLOCK]; -__data uint16_t ao_ee_block = EE_BLOCK_NONE; -__data uint8_t ao_ee_block_dirty; +static __xdata uint8_t ao_ee_data[EE_BLOCK]; +static __pdata uint16_t ao_ee_block = EE_BLOCK_NONE; +static __pdata uint8_t ao_ee_block_dirty; /* Write the current block to the EEPROM */ static void diff --git a/ao_report.c b/ao_report.c index 2c4554b5..cee2bf3a 100644 --- a/ao_report.c +++ b/ao_report.c @@ -82,5 +82,5 @@ static __xdata struct ao_task ao_report_task; void ao_report_init(void) { - ao_add_task(&ao_report_task, ao_report); + ao_add_task(&ao_report_task, ao_report, "report"); } diff --git a/ao_timer.c b/ao_timer.c index 2bd47af1..8b485cc2 100644 --- a/ao_timer.c +++ b/ao_timer.c @@ -21,7 +21,7 @@ static volatile __data uint16_t ao_tick_count; uint16_t ao_time(void) { - __data uint16_t ret; + uint16_t ret; __critical { ret = ao_tick_count; }