X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_ee.c;h=a2fe8dc19a974384706b4cc5b0b7efcd1fdb90ed;hp=83863af562af58bb6f9ff337fda21af8aec0ff4c;hb=93ecaf7f18f8f4c15953c2e80dc9e1b20d04fdfa;hpb=b65140a0139075adeddaccf0f4d5c7a75fac4757 diff --git a/src/ao_ee.c b/src/ao_ee.c index 83863af5..a2fe8dc1 100644 --- a/src/ao_ee.c +++ b/src/ao_ee.c @@ -49,19 +49,9 @@ static __xdata uint8_t ao_ee_mutex; _asm nop _endasm; \ } while(0) -static void ao_ee_cs_low(void) -{ - ao_ee_delay(); - EE_CS = 0; - ao_ee_delay(); -} +#define ao_ee_cs_low() ao_spi_get_bit(EE_CS) -static void ao_ee_cs_high(void) -{ - ao_ee_delay(); - EE_CS = 1; - ao_ee_delay(); -} +#define ao_ee_cs_high() ao_spi_put_bit(EE_CS) struct ao_ee_instruction { uint8_t instruction;