zpu: move spi mask into spi.c

This commit is contained in:
Josh Blum
2015-03-24 01:00:05 -07:00
parent 35522afed1
commit ca17c9da65
3 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@@ -51,5 +51,5 @@ uint32_t spi_transact(bool readback, int slave, uint32_t data, int length, uint3
if (!readback) return 0;
spi_wait();
return readback_mux->spi;
return readback_mux->spi & ((1 << length)-1);
}

View File

@@ -45,9 +45,9 @@ umtrx_init(void)
// Check LMS presense
res = spi_transact(SPI_TXRX, SPI_SS_LMS1, LMS_RD_CMD(0x04), 16, SPI_PUSH_FALL|SPI_LATCH_RISE);
printf("LMS1 chip version = 0x%x\n", res & 0xffff);
printf("LMS1 chip version = 0x%x\n", res);
res = spi_transact(SPI_TXRX, SPI_SS_LMS2, LMS_RD_CMD(0x04), 16, SPI_PUSH_FALL|SPI_LATCH_RISE);
printf("LMS2 chip version = 0x%x\n", res & 0xffff);
printf("LMS2 chip version = 0x%x\n", res);
// Init GPSDO
gpsdo_init();