X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=gpio%2Fps_protocol.c;h=4fb4ee6a677283f60592da01c8b42178fb656439;hb=b7f62f8e5d67dd7c155db81c3c44f656d8329883;hp=cc21af6c27b35b268b78fffc460e4fa4d1241709;hpb=5762d343fa675103bf067938887b6f726cf8e149;p=pistorm diff --git a/gpio/ps_protocol.c b/gpio/ps_protocol.c index cc21af6..4fb4ee6 100644 --- a/gpio/ps_protocol.c +++ b/gpio/ps_protocol.c @@ -113,8 +113,7 @@ void ps_write_16(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_8(unsigned int address, unsigned int data) { @@ -146,8 +145,7 @@ 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) { @@ -177,9 +175,7 @@ unsigned int ps_read_16(unsigned int address) { *(gpio + 7) = (REG_DATA << PIN_A0); *(gpio + 7) = 1 << PIN_RD; - while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) - ; - + while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) {} unsigned int value = *(gpio + 13); *(gpio + 10) = 0xffffec; @@ -209,9 +205,7 @@ unsigned int ps_read_8(unsigned int address) { *(gpio + 7) = (REG_DATA << PIN_A0); *(gpio + 7) = 1 << PIN_RD; - while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) - ; - + while (*(gpio + 13) & (1 << PIN_TXN_IN_PROGRESS)) {} unsigned int value = *(gpio + 13); *(gpio + 10) = 0xffffec;