In GNURL78 v13.01 __far keyword is fixed. Now it is possible to use far pointers to flash area.
This commit is contained in:
parent
ec8b88252a
commit
f576489c6e
3 changed files with 3 additions and 4 deletions
3
main.c
3
main.c
|
@ -53,8 +53,7 @@ int main(void)
|
||||||
{
|
{
|
||||||
LED2 = 0;
|
LED2 = 0;
|
||||||
flag_1hz = 0;
|
flag_1hz = 0;
|
||||||
const char msg[] = "Hello, RL78! [:";
|
uart0_puts("Hello, RL78! [:");
|
||||||
uart0_puts(msg);
|
|
||||||
LED2 = 1;
|
LED2 = 1;
|
||||||
}
|
}
|
||||||
asm("halt");
|
asm("halt");
|
||||||
|
|
2
uart0.c
2
uart0.c
|
@ -72,7 +72,7 @@ void uart0_init(void)
|
||||||
STIF0 = 1; /* Set buffer empty interrupt request flag */
|
STIF0 = 1; /* Set buffer empty interrupt request flag */
|
||||||
}
|
}
|
||||||
|
|
||||||
int uart0_puts(const char * s)
|
int uart0_puts(const char __far * s)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
SMR00.smr00 |= 0x0001U; /* Set buffer empty interrupt */
|
SMR00.smr00 |= 0x0001U; /* Set buffer empty interrupt */
|
||||||
|
|
2
uart0.h
2
uart0.h
|
@ -2,6 +2,6 @@
|
||||||
#define UART0_H__
|
#define UART0_H__
|
||||||
|
|
||||||
void uart0_init(void);
|
void uart0_init(void);
|
||||||
int uart0_puts(const char * s);
|
int uart0_puts(const char __far * s);
|
||||||
|
|
||||||
#endif // UART0_H__
|
#endif // UART0_H__
|
||||||
|
|
Loading…
Reference in a new issue