summaryrefslogtreecommitdiff
path: root/source/gpio_ext.c
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2018-02-14 16:53:49 +0100
committerDominik Sliwa <dominik.sliwa@toradex.com>2018-02-28 14:38:45 +0100
commit4a48136e9c6d55ff9d9427a91ef43d44d26333d7 (patch)
treebc8d4630e75c10ba6580cabedbba619a006aeca3 /source/gpio_ext.c
parent3020f5caf0b09fcaf85b3b3fa84fdf688ba22cc0 (diff)
spi, can and general improvements
SPI: -move to single transfer read -clear interrupt register on read -perform multibyte read transfers with DMA -make frame format consistant CAN: -move from mailbox to CAN FIFO -implement buffering -support for reading multiple frames per transfer General: -use PLL at 100MHz -remove debug task -do not compile release with debug console enabled -bumped version to 0.13 Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'source/gpio_ext.c')
-rw-r--r--source/gpio_ext.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gpio_ext.c b/source/gpio_ext.c
index 6d4d3a8..839cd58 100644
--- a/source/gpio_ext.c
+++ b/source/gpio_ext.c
@@ -95,10 +95,10 @@ uint8_t get_gpio_status(uint8_t pin)
int gpio_registers(dspi_transfer_t *spi_transfer)
{
uint8_t *rx_buf = spi_transfer->rxData;
- uint8_t *tx_buf = &spi_transfer->txData[1];
+ uint8_t *tx_buf = &spi_transfer->txData[0];
if (rx_buf[0] == APALIS_TK1_K20_READ_INST) {
- switch (rx_buf[2]) {
+ /* switch (rx_buf[1]) {
case APALIS_TK1_K20_GPIOREG:
return -ENOENT;
break;
@@ -121,7 +121,7 @@ int gpio_registers(dspi_transfer_t *spi_transfer)
break;
default:
return -ENOENT;
- }
+ } */
} else if (rx_buf[0] == APALIS_TK1_K20_WRITE_INST) {
switch (rx_buf[1]) {
case APALIS_TK1_K20_GPIOREG: