diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-11-07 12:15:24 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-11-07 12:15:24 +0000 |
commit | bef7ab0c2648bff663700645b019969d53ea5923 (patch) | |
tree | ff9a3e9761e9741621eabb4a307d7bd20dc05aa8 /firmware/drivers/fmradio.c | |
parent | 0dd7d48c3a216e6f6e8441d7444c330d1e83ada4 (diff) |
The code police strikes back
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4024 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/fmradio.c')
-rw-r--r-- | firmware/drivers/fmradio.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/firmware/drivers/fmradio.c b/firmware/drivers/fmradio.c index 4b496b7e1c..604005b884 100644 --- a/firmware/drivers/fmradio.c +++ b/firmware/drivers/fmradio.c @@ -32,21 +32,16 @@ DO (Data Out) - PB4 */ -#define PB0 0x0001 -#define PB1 0x0002 -#define PB3 0x0008 -#define PB4 0x0010 - /* cute little functions */ -#define CE_LO __clear_bit_constant(3, PBDRL_ADDR) -#define CE_HI __set_bit_constant(3, PBDRL_ADDR) -#define CL_LO __clear_bit_constant(1, PBDRL_ADDR) -#define CL_HI __set_bit_constant(1, PBDRL_ADDR) -#define DO (PBDR & PB4) -#define DI_LO __clear_bit_constant(0, PBDRL_ADDR) -#define DI_HI __set_bit_constant(0, PBDRL_ADDR) - -#define START __set_mask_constant((PB3 | PB1), PBDRL_ADDR) +#define CE_LO and_b(~0x08, PBDRL_ADDR) +#define CE_HI or_b(0x08, PBDRL_ADDR) +#define CL_LO and_b(~0x02, PBDRL_ADDR) +#define CL_HI or_b(0x02, PBDRL_ADDR) +#define DO (PBDR & 0x10) +#define DI_LO and_b(~0x01, PBDRL_ADDR) +#define DI_HI or_b(0x01, PBDRL_ADDR) + +#define START or_b((0x08 | 0x02), PBDRL_ADDR) /* delay loop */ #define DELAY do { int _x; for(_x=0;_x<10;_x++);} while (0) |