From f576489c6e90d29d15fc3c66277021e8abd98bd0 Mon Sep 17 00:00:00 2001 From: Maxim Salov Date: Sun, 17 Mar 2013 22:52:01 +0300 Subject: [PATCH] In GNURL78 v13.01 __far keyword is fixed. Now it is possible to use far pointers to flash area. --- main.c | 3 +-- uart0.c | 2 +- uart0.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 480321676..ca249c544 100644 --- a/main.c +++ b/main.c @@ -53,8 +53,7 @@ int main(void) { LED2 = 0; flag_1hz = 0; - const char msg[] = "Hello, RL78! [:"; - uart0_puts(msg); + uart0_puts("Hello, RL78! [:"); LED2 = 1; } asm("halt"); diff --git a/uart0.c b/uart0.c index 0b79e4ac0..d58fa787b 100644 --- a/uart0.c +++ b/uart0.c @@ -72,7 +72,7 @@ void uart0_init(void) STIF0 = 1; /* Set buffer empty interrupt request flag */ } -int uart0_puts(const char * s) +int uart0_puts(const char __far * s) { int len = 0; SMR00.smr00 |= 0x0001U; /* Set buffer empty interrupt */ diff --git a/uart0.h b/uart0.h index fd97204f5..9512eacfb 100644 --- a/uart0.h +++ b/uart0.h @@ -2,6 +2,6 @@ #define UART0_H__ void uart0_init(void); -int uart0_puts(const char * s); +int uart0_puts(const char __far * s); #endif // UART0_H__