*(gpio + 1) = GPFSEL1_INPUT;
*(gpio + 2) = GPFSEL2_INPUT;
- while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS))
- ;
+ while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) {}
}
void ps_write_8(unsigned int address, unsigned int data) {
*(gpio + 1) = GPFSEL1_INPUT;
*(gpio + 2) = GPFSEL2_INPUT;
- while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS))
- ;
+ while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) {}
}
void ps_write_32(unsigned int address, unsigned int value) {
*(gpio + 7) = (REG_DATA << PIN_A0);
*(gpio + 7) = 1 << PIN_RD;
+ while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) {}
unsigned int value = *(gpio + 13);
- while ((value=*(gpio + 13)) & (1 << PIN_TXN_IN_PROGRESS))
- ;
*(gpio + 10) = 0xffffec;
*(gpio + 7) = (REG_DATA << PIN_A0);
*(gpio + 7) = 1 << PIN_RD;
+ while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) {}
unsigned int value = *(gpio + 13);
- while ((value=*(gpio + 13)) & (1 << PIN_TXN_IN_PROGRESS))
- ;
*(gpio + 10) = 0xffffec;