X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM2%2Fvend.h;h=17ba674d1fd88c2deee12ec3b8692bde5283c997;hb=c1fd53d73bce8779c822e3ed74de94f40714f9ca;hp=11c483d14729a3a99966b36de772231a9aec9603;hpb=080c85d87da93ba2472b0c90d17527838d668db2;p=uccvend-snackrom.git diff --git a/ROM2/vend.h b/ROM2/vend.h index 11c483d..17ba674 100644 --- a/ROM2/vend.h +++ b/ROM2/vend.h @@ -11,16 +11,10 @@ */ #define buffered_addr(a) \ extern volatile u8 _##a; \ - u8 a; \ + volatile u8 a; \ extern inline void set_##a(u8 b) { a = b; _##a = b; } \ - extern inline void bset_##a(const u8 m) { \ - bset(&a, m); \ - asm volatile ( "ldab %1\nstab %0\n" \ - : "=m"(_##a) : "m"(a) : "d"); } \ - extern inline void bclr_##a(const u8 m) { \ - bclr(&a, m); \ - asm volatile ( "ldab %1\nstab %0\n" \ - : "=m"(_##a) : "m"(a) : "d"); } + extern inline void bset_##a(const u8 m) { bset((void*)&a, m); _##a = a; } \ + extern inline void bclr_##a(const u8 m) { bclr((void*)&a, m); _##a = a; } buffered_addr(changer_output); buffered_addr(misc_output); @@ -47,7 +41,7 @@ void my_memcpy(char* dst, char* src, u8 size); #define PORTD_KEYPAD_ROW 0x20 /* clear for row 0, set for row 1 */ -#define PORTE_MOTOR_OVERCURRENT 0x01 +#define PORTE_MOTOR_NOT_OVERCURRENT 0x01 #define PORTE_MOTOR_OVERVOLTAGE 0x02 /* Address 1800 bits */ @@ -66,7 +60,8 @@ void my_memcpy(char* dst, char* src, u8 size); /******* from main.c *******/ int __attribute__((noreturn)) main (void); void __attribute__((interrupt)) rti (void); -void __attribute__((interrupt)) sci_interrupt (void); +void __attribute__((interrupt)) sci_interrupt_serial (void); +void __attribute__((interrupt)) sci_interrupt_coinmech (void); void __attribute__((interrupt)) uart_interrupt (void); /* other one liners */