sw: getting dfu working about to add debug bridge

We're having issues getteing DFU working.  It almost works, but has some
issues.  Unfortunately, we're out of space for printf.

Now we will work to get the UART Wishbone bridge working, to move
forward on debugging support.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
2019-03-26 09:39:55 +08:00
parent b0afd2b0ae
commit a3298226e5
8 changed files with 226 additions and 227 deletions

View File

@ -3,25 +3,25 @@
#include "spi-gpio.h"
static uint8_t do_mirror;
static uint8_t oe_mirror;
// static uint8_t do_mirror;
// static uint8_t oe_mirror;
void gpioSetMode(int pin, int mode) {
if (mode)
oe_mirror |= 1 << pin;
else
oe_mirror &= ~(1 << pin);
picospi_oe_write(oe_mirror);
}
// void gpioSetMode(int pin, int mode) {
// if (mode)
// oe_mirror |= 1 << pin;
// else
// oe_mirror &= ~(1 << pin);
// picospi_oe_write(oe_mirror);
// }
void gpioWrite(int pin, int val) {
if (val)
do_mirror |= 1 << pin;
else
do_mirror &= ~(1 << pin);
picospi_do_write(do_mirror);
}
// void gpioWrite(int pin, int val) {
// if (val)
// do_mirror |= 1 << pin;
// else
// do_mirror &= ~(1 << pin);
// picospi_do_write(do_mirror);
// }
int gpioRead(int pin) {
return !!(picospi_di_read() & (1 << pin));
}
// int gpioRead(int pin) {
// return !!(picospi_di_read() & (1 << pin));
// }