summaryrefslogtreecommitdiff
path: root/src/cortexelf-v1
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2019-01-02 22:23:04 -0700
committerBdale Garbee <bdale@gag.com>2019-01-02 22:23:04 -0700
commitb340cbf1403a5f5b181a215935f713a50da8e5e4 (patch)
tree8c0d2afbe8168c29584e0d568b80353fdf555883 /src/cortexelf-v1
parent1da4b57545233f2f2afd350bd8aed4ef7bb0c844 (diff)
parent95ffec073b0758801df04a77eca0bd2bc6e57e35 (diff)
Merge branch 'branch-1.9' into debian
Diffstat (limited to 'src/cortexelf-v1')
-rw-r--r--src/cortexelf-v1/ao_cortexelf.c17
-rw-r--r--src/cortexelf-v1/cortexelf.ld4
2 files changed, 9 insertions, 12 deletions
diff --git a/src/cortexelf-v1/ao_cortexelf.c b/src/cortexelf-v1/ao_cortexelf.c
index 5ed78bf0..1c30cd85 100644
--- a/src/cortexelf-v1/ao_cortexelf.c
+++ b/src/cortexelf-v1/ao_cortexelf.c
@@ -149,17 +149,16 @@ ao_fb_init(void)
static void
ao_video_toggle(void)
{
- ao_cmd_decimal();
- if (ao_cmd_lex_i)
+ uint16_t r = ao_cmd_decimal();
+ if (r)
ao_fb_init();
- ao_vga_enable(ao_cmd_lex_i);
+ ao_vga_enable(r)
}
static void
ao_ball_toggle(void)
{
- ao_cmd_decimal();
- ball_enable = ao_cmd_lex_i;
+ ball_enable = ao_cmd_decimal();
ao_wakeup(&ball_enable);
}
@@ -208,17 +207,15 @@ led_cmd(void)
{
uint8_t start;
uint8_t value;
- ao_cmd_decimal();
- start = ao_cmd_lex_i;
- ao_cmd_hex();
- value = ao_cmd_lex_i;
+ start = ao_cmd_decimal();
+ value = ao_cmd_hex();
if (ao_cmd_status != ao_cmd_success)
return;
ao_as1107_write_8(start, value);
}
-__code struct ao_cmds ao_demo_cmds[] = {
+const struct ao_cmds ao_demo_cmds[] = {
{ ao_video_toggle, "V\0Toggle video" },
{ ao_ball_toggle, "B\0Toggle ball" },
{ ao_ps2_read_keys, "K\0Read keys from keyboard" },
diff --git a/src/cortexelf-v1/cortexelf.ld b/src/cortexelf-v1/cortexelf.ld
index 6ad2a679..069fe5bd 100644
--- a/src/cortexelf-v1/cortexelf.ld
+++ b/src/cortexelf-v1/cortexelf.ld
@@ -75,10 +75,10 @@ SECTIONS {
/* Data -- relocated to RAM, but written to ROM
*/
.data : {
- __data_start__ = .;
+ _start__ = .;
*(.data) /* initialized data */
. = ALIGN(4);
- __data_end__ = .;
+ _end__ = .;
} >ram AT>rom
.bss : {