From b5bd5264760c63606ccedf8b428abc03fd90abc5 Mon Sep 17 00:00:00 2001 From: sys64738 Date: Sat, 17 Jul 2021 02:30:32 +0200 Subject: [PATCH] ok it works now. shows up in sysfs, but spidev doesnt bind to it :/ --- host/modules/spi-dmj.c | 2 +- src/m_default/cdc_serprog.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/host/modules/spi-dmj.c b/host/modules/spi-dmj.c index 02ca66f..12fd25c 100644 --- a/host/modules/spi-dmj.c +++ b/host/modules/spi-dmj.c @@ -295,7 +295,7 @@ static int dmj_spi_get_caps(struct dmj_spi *dmjs) dmjs->caps.min_bpw = rbuf[12]; dmjs->caps.max_bpw = rbuf[13]; - dev_dbg(dev, "got caps: freq=%d..%d, flgcaps=%04hx, bpw=%d..%d, num cs=%d\n", + dev_info(dev, " capabilities: freq=%d..%d, flgcaps=%04hx, bpw=%d..%d, num cs=%d\n", dmjs->caps.freq_min, dmjs->caps.freq_max, dmjs->caps.flgcaps, dmjs->caps.min_bpw, dmjs->caps.max_bpw, dmjs->caps.num_cs); diff --git a/src/m_default/cdc_serprog.c b/src/m_default/cdc_serprog.c index 0c644f5..af6070c 100644 --- a/src/m_default/cdc_serprog.c +++ b/src/m_default/cdc_serprog.c @@ -24,6 +24,7 @@ static const uint8_t serprog_cmdmap[32] = { 0, // 20..27 0, // 28..2f 0, // 30..37 + 0, // 38..3f 0xff, // cmd 40..47 0, // rest is 0 }; @@ -350,7 +351,7 @@ static uint32_t vnd_flushpkt(uint8_t ud) { return 0; } void sp_spi_bulk_cmd(void) { - uint8_t cmd = read_byte_cdc(); + uint8_t cmd = vnd_cfg_read_byte(); handle_cmd(cmd, VND_N_CFG, vnd_cfg_read_byte, vnd_writepkt, vnd_flushpkt, vnd_cfg_write_resp);