summaryrefslogtreecommitdiff
path: root/src/product
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-08-15 17:47:37 -0700
committerKeith Packard <keithp@keithp.com>2018-10-13 08:22:50 -0700
commitc6e57291d91f1f6c4de5c54a5cfd3eef66d9f830 (patch)
tree1fb7753fad10c6897906baec11d2f5756a9bb866 /src/product
parent6023ff81f1bbd240169b9548209133d3b02d475f (diff)
altos: Remove 8051 address space specifiers
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/product')
-rw-r--r--src/product/ao_flash_task.c2
-rw-r--r--src/product/ao_terraui.c56
-rw-r--r--src/product/ao_test.c18
3 files changed, 38 insertions, 38 deletions
diff --git a/src/product/ao_flash_task.c b/src/product/ao_flash_task.c
index 1f0edb05..a680ca18 100644
--- a/src/product/ao_flash_task.c
+++ b/src/product/ao_flash_task.c
@@ -29,7 +29,7 @@ ao_panic(uint8_t reason)
}
void
-ao_put_string(__code char *s)
+ao_put_string(const char *s)
{
char c;
while ((c = *s++)) {
diff --git a/src/product/ao_terraui.c b/src/product/ao_terraui.c
index f8f23a0f..3a989f5a 100644
--- a/src/product/ao_terraui.c
+++ b/src/product/ao_terraui.c
@@ -20,15 +20,15 @@
#include <ao_flight.h>
#include <math.h>
-static __xdata struct ao_telemetry_sensor ao_tel_sensor;
-static __xdata struct ao_telemetry_location ao_tel_location;
-static __xdata struct ao_telemetry_configuration ao_tel_config;
-static __xdata int16_t ao_tel_max_speed;
-static __xdata int16_t ao_tel_max_height;
+static struct ao_telemetry_sensor ao_tel_sensor;
+static struct ao_telemetry_location ao_tel_location;
+static struct ao_telemetry_configuration ao_tel_config;
+static int16_t ao_tel_max_speed;
+static int16_t ao_tel_max_height;
static int8_t ao_tel_rssi;
-static __xdata char ao_lcd_line[17];
-static __xdata char ao_state_name[] = "SIPBFCDMLI";
+static char ao_lcd_line[17];
+static char ao_state_name[] = "SIPBFCDMLI";
static void
ao_terraui_line(uint8_t addr)
@@ -85,7 +85,7 @@ ao_terraui_logging(void)
return '-';
}
-static __code char ao_progress[4] = { '\011', '\012', '\014', '\013' };
+static const char ao_progress[4] = { '\011', '\012', '\014', '\013' };
static uint8_t ao_telem_progress;
static uint8_t ao_gps_progress;
@@ -165,7 +165,7 @@ static int16_t mag(int32_t d)
static int32_t
dist(int32_t d)
{
- __pdata uint32_t m;
+ uint32_t m;
uint8_t neg = 0;
if (d < 0) {
@@ -184,7 +184,7 @@ dist(int32_t d)
return d;
}
-static __code uint8_t cos_table[] = {
+static const uint8_t cos_table[] = {
0, /* 0 */
0, /* 1 */
0, /* 2 */
@@ -242,7 +242,7 @@ static __code uint8_t cos_table[] = {
1, /* 54 */
};
-static __code uint8_t tan_table[] = {
+static const uint8_t tan_table[] = {
0, /* 0 */
4, /* 1 */
9, /* 2 */
@@ -290,7 +290,7 @@ static __code uint8_t tan_table[] = {
247, /* 44 */
};
-int16_t ao_atan2(int32_t dy, int32_t dx) __reentrant
+int16_t ao_atan2(int32_t dy, int32_t dx)
{
int8_t m = 1;
int16_t a = 0;
@@ -334,10 +334,10 @@ int16_t ao_atan2(int32_t dy, int32_t dx) __reentrant
return t * m + a;
}
-static __pdata int32_t lon_dist, lat_dist;
-static __pdata uint32_t ground_dist, range;
-static __pdata uint8_t dist_in_km;
-static __pdata int16_t bearing, elevation;
+static int32_t lon_dist, lat_dist;
+static uint32_t ground_dist, range;
+static uint8_t dist_in_km;
+static int16_t bearing, elevation;
static void
ao_terraui_lat_dist(void)
@@ -346,7 +346,7 @@ ao_terraui_lat_dist(void)
}
static void
-ao_terraui_lon_dist(void) __reentrant
+ao_terraui_lon_dist(void)
{
uint8_t c = cos_table[ao_gps_data.latitude >> 24];
lon_dist = ao_tel_location.longitude;
@@ -418,7 +418,7 @@ ao_terraui_recover(void)
}
static void
-ao_terraui_coord(int32_t c, char plus, char minus, char extra) __reentrant
+ao_terraui_coord(int32_t c, char plus, char minus, char extra)
{
uint16_t d;
uint8_t m;
@@ -448,7 +448,7 @@ ao_terraui_remote(void)
}
static void
-ao_terraui_local(void) __reentrant
+ao_terraui_local(void)
{
ao_terraui_coord(ao_gps_data.latitude, 'n', 's',
ao_terraui_local_gps());
@@ -457,11 +457,11 @@ ao_terraui_local(void) __reentrant
ao_terraui_line(AO_LCD_ADDR(1,0));
}
-static __pdata uint8_t ao_set_freq;
-static __pdata uint32_t ao_set_freq_orig;
+static uint8_t ao_set_freq;
+static uint32_t ao_set_freq_orig;
static void
-ao_terraui_freq(void) __reentrant
+ao_terraui_freq(void)
{
uint16_t MHz;
uint16_t frac;
@@ -508,7 +508,7 @@ ao_terraui_freq_button(char b) {
ao_radio_recv_abort();
}
-static __code void (*__code ao_terraui_page[])(void) = {
+static const void (*const ao_terraui_page[])(void) = {
ao_terraui_startup,
ao_terraui_info,
ao_terraui_pad,
@@ -521,8 +521,8 @@ static __code void (*__code ao_terraui_page[])(void) = {
#define NUM_PAGE (sizeof (ao_terraui_page)/sizeof (ao_terraui_page[0]))
-static __pdata uint8_t ao_current_page = 0;
-static __pdata uint8_t ao_shown_about = 3;
+static uint8_t ao_current_page = 0;
+static uint8_t ao_shown_about = 3;
static void
ao_terraui(void)
@@ -575,7 +575,7 @@ ao_terraui(void)
}
}
-__xdata static struct ao_task ao_terraui_task;
+static struct ao_task ao_terraui_task;
static void
ao_terramonitor(void)
@@ -619,7 +619,7 @@ ao_terramonitor(void)
}
}
-__xdata static struct ao_task ao_terramonitor_task;
+static struct ao_task ao_terramonitor_task;
static void
ao_terragps(void)
@@ -634,7 +634,7 @@ ao_terragps(void)
}
}
-__xdata static struct ao_task ao_terragps_task;
+static struct ao_task ao_terragps_task;
void
ao_terraui_init(void)
diff --git a/src/product/ao_test.c b/src/product/ao_test.c
index d1c60804..5db36293 100644
--- a/src/product/ao_test.c
+++ b/src/product/ao_test.c
@@ -18,13 +18,13 @@
#include "ao.h"
-struct ao_task __xdata blink_0_task;
-struct ao_task __xdata blink_1_task;
-struct ao_task __xdata wakeup_task;
-struct ao_task __xdata beep_task;
-struct ao_task __xdata echo_task;
+struct ao_task blink_0_task;
+struct ao_task blink_1_task;
+struct ao_task wakeup_task;
+struct ao_task beep_task;
+struct ao_task echo_task;
-void delay(int n) __reentrant
+void delay(int n)
{
uint8_t j = 0;
while (--n)
@@ -32,7 +32,7 @@ void delay(int n) __reentrant
ao_yield();
}
-static __xdata uint8_t blink_chan;
+static uint8_t blink_chan;
void
blink_0(void)
@@ -51,7 +51,7 @@ blink_0(void)
void
blink_1(void)
{
- static __xdata struct ao_adc adc;
+ static struct ao_adc adc;
for (;;) {
ao_sleep(&ao_adc_head);
@@ -75,7 +75,7 @@ wakeup(void)
void
beep(void)
{
- static __xdata struct ao_adc adc;
+ static struct ao_adc adc;
for (;;) {
ao_delay(AO_SEC_TO_TICKS(1));