init PE4302 attenuation cache as impossible value

pull/4/head
DiSlord 6 years ago
parent aea7761a55
commit 5f12c3afbb

@ -125,7 +125,7 @@ static void shiftOutBuf(uint8_t *buf, uint16_t size) {
} }
#endif #endif
const uint16_t SI_nSEL[MAX_SI4432] = { GPIO_RX_SEL, GPIO_LO_SEL, 0}; // #3 is dummy!!!!!! const uint16_t SI_nSEL[MAX_SI4432+1] = { GPIO_RX_SEL, GPIO_LO_SEL, 0}; // #3 is dummy!!!!!!
volatile int SI4432_Sel = 0; // currently selected SI4432 volatile int SI4432_Sel = 0; // currently selected SI4432
// volatile int SI4432_guard = 0; // volatile int SI4432_guard = 0;
@ -659,11 +659,11 @@ void PE4302_shiftOut(uint8_t val)
} }
#endif #endif
static unsigned char old_attenuation = 0; static unsigned char old_attenuation = 255;
bool PE4302_Write_Byte(unsigned char DATA ) bool PE4302_Write_Byte(unsigned char DATA )
{ {
// if (old_attenuation == DATA) if (old_attenuation == DATA)
// return false; return false;
// chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
SPI2_CLK_LOW; SPI2_CLK_LOW;
// chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);

Loading…
Cancel
Save

Powered by TurnKey Linux.