X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fdrivers%2Fao_m25.c;fp=src%2Fdrivers%2Fao_m25.c;h=accf943a3fbe6e079ad0825b21f53d08823828fb;hp=2e4cbedf989d23991c54245b6a6a18d392e2d1b1;hb=b140da92536d7c48ba37868f1c2afce7bb86dfdb;hpb=1d208c9509f03f7e2c913abe5c0dd78ef0083c0f diff --git a/src/drivers/ao_m25.c b/src/drivers/ao_m25.c index 2e4cbedf..accf943a 100644 --- a/src/drivers/ao_m25.c +++ b/src/drivers/ao_m25.c @@ -125,7 +125,7 @@ ao_m25_wait_wip(ao_port_t cs) ao_spi_recv(ao_m25_instruction, 1, AO_M25_SPI_BUS); } while (ao_m25_instruction[0] & M25_STATUS_WIP); M25_DESELECT(cs); - ao_m25_wip &= ~cs; + ao_m25_wip &= (ao_port_t) ~cs; } } @@ -192,9 +192,9 @@ ao_m25_set_address(uint32_t pos) #endif ao_m25_wait_wip(mask); - ao_m25_instruction[1] = pos >> 16; - ao_m25_instruction[2] = pos >> 8; - ao_m25_instruction[3] = pos; + ao_m25_instruction[1] = (uint8_t) (pos >> 16); + ao_m25_instruction[2] = (uint8_t) (pos >> 8); + ao_m25_instruction[3] = (uint8_t) (pos); return mask; }