replace % with & to save space require to compile with newer SDCC
This commit is contained in:
parent
c245295cc3
commit
157a8ee41f
@ -82,15 +82,15 @@ uint8_t read_eeprom(uint8_t address) {
|
||||
/* transmit the megacode */
|
||||
void megacode (void) {
|
||||
static uint8_t byte;
|
||||
uint8_t bit = phase/4;
|
||||
uint8_t bit = phase / 4;
|
||||
if (transmit != 0) {
|
||||
if (bit%8==0) { // read byte to transmit
|
||||
byte = read_eeprom(bit/8);
|
||||
if (bit & 0x7 == 0) { // read byte to transmit
|
||||
byte = read_eeprom(bit / 8);
|
||||
}
|
||||
if (bit<24) { // transmit bit
|
||||
if (phase%2) {
|
||||
uint8_t pulse = (byte>>((23-bit)%8))&0x01;
|
||||
if ((phase%4==1 && !pulse) || (phase%4==3 && pulse)) {
|
||||
if (bit < 24) { // transmit bit
|
||||
if (phase & 0x1) {
|
||||
uint8_t pulse = (byte >> ((23 - bit) & 0x7)) & 0x01;
|
||||
if ((phase & 0x3 == 1 && !pulse) || (phase & 0x3 == 3 && pulse)) {
|
||||
led_off();
|
||||
tx_on();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user