From d5ecafa203fe4d341d05d7a2bea4ee843f19a6bb Mon Sep 17 00:00:00 2001 From: whowechina Date: Thu, 28 Sep 2023 20:29:07 +0800 Subject: [PATCH] SFI, FFI and ESI config --- Production/Firmware/chu_pico.uf2 | Bin 123904 -> 124416 bytes firmware/src/cmd.c | 21 +++++++++++++++------ firmware/src/mpr121.c | 5 +++-- firmware/src/mpr121.h | 3 +-- firmware/src/slider.c | 8 +++++--- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/Production/Firmware/chu_pico.uf2 b/Production/Firmware/chu_pico.uf2 index f2e1729b2b6dc21c811750a7e353c4607094f79c..579b28b736ffe54e7bb660bb5e6bae55dbc0ec1d 100644 GIT binary patch delta 20021 zcmbV!33wD$*7m*CSvpITPCAgS3Dw;pG$cSaAOb>Xp~wOlf-oTg466YdY%wqqk+g`& zq8PYHg+&C%VKAU#BrXUV{TLSnO=K}FYEU$e<7f?_>Gb-aTh&XI|M)!r|M5IGRdwpz z_q^wvyVdO~Y#)W&&W1N7;#;pKc`?34l9;cmf)Ry9#OlGz+0H zR9SK4wb~iNWu&F&8}%y2?mNHR`24dWSCBRonA!Obav8 z!^*I<$TSx+7k7jT)gE#nEIs=xcR6Q6NmVQwl!b)r9-N1S7T1A7p$nzO436wZrbr_a z-t%C@B6_cj^o9*#%DgU`&&?EdAHuMaM41W6SG)2>BVfQP~?88 zC)I=o@8O~V5E&~BNO;D>jG~}Oc)`OC|F**nXXVZ?RHsM6WHMhpr19`sq@7q8gS2fq z?1p2ZLX5kAiRuW`f?o_1W`h^1&e+n}l5nBOuG+)w#?4_uoGV($cSH%doe=`##=<*& zkyBU{Dm3>QP(%q5HhPh;zYhruoJiQ@!NMAE$T96Hp_D6h;c~+Zkbn9Sik#1fJ)Dt#`rJ zRyTN@o;oDMdY|=(^4|Uu2*)BjFdDh@};YzM+K6_ zqGS+AF1SAIY3C{u5G%BOzy;b(qgrY=YFWEUD@AQ-CDB5xU1iX+VM3`>Wr&62BquUr zQBozIQP~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+ zSku94b`1lpk0QPCSSEh_}Ch(=+3Ee*Rrcmn|>km)$YLwNy;4T>EKeWioGzOnhN z_|t9-w|SMa(S8UwG`{~2 zq|v^JG#nIq{T1vz&p@$2Nrn;yWy4EIvlPl(aJ@6|SqGm&;Cc{z#ssc&THzXsC-9xN zxkl?jMz8-=3}FE%J$nHDPaoLPjE0hb2x-)9J>qo;$4?H%i^gKn>+qTulr2zNU^{X3 zEhR=D!*w=XCqwbP2~!Gu|8sc@E{Q+AMo0Y{_&h1X7CPutE-MLq z8EggZ5(8ddxR--KK-mmsKSX&Qd>)3+lThYef}b7WGXh@nLYAL@6ZyArLm>RG_Xz)6 zc&Er84phqat}6DfGWJCKVXAhNQ4`gN*%`xrlqwwWp>VW^!f~qb4k(!5f8Y>3$9k}M zhgQA|mBB5gsD7tM>vyTb`*=20kpByflrI#TU-Y2)K2qW#Nf=#3mr8OhWE^!NJCq_ Mi&aH`do}L=0VJk-nE(I) diff --git a/firmware/src/cmd.c b/firmware/src/cmd.c index 9f3a4b7..6758a07 100644 --- a/firmware/src/cmd.c +++ b/firmware/src/cmd.c @@ -98,7 +98,9 @@ static void disp_tof() static void disp_sense() { printf("[Sense]\n"); - printf(" Filter: %d, %d\n", chu_cfg->sense.filter >> 4, chu_cfg->sense.filter & 0xf); + printf(" Filter: %u, %u, %u\n", chu_cfg->sense.filter >> 6, + (chu_cfg->sense.filter >> 4) & 0x03, + chu_cfg->sense.filter & 0x07); printf(" Sensitivity (global: %+d):\n", chu_cfg->sense.global); printf(" | 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|13|14|15|16|\n"); printf(" ---------------------------------------------------\n"); @@ -285,22 +287,29 @@ static void handle_tof(int argc, char *argv[]) static void handle_filter(int argc, char *argv[]) { - const char *usage = "Usage: filter \n" - " first, second: 0..3\n"; - if ((argc < 2) || (argc > 2)) { + const char *usage = "Usage: filter [interval]\n" + " first: First iteration [0..3]\n" + " second: Second iteration [0..3]\n" + " interval: Interval of second iterations [0..7]\n"; + if ((argc < 2) || (argc > 3)) { printf(usage); return; } int ffi = extract_non_neg_int(argv[0], 0); int sfi = extract_non_neg_int(argv[1], 0); + int intv = chu_cfg->sense.filter & 0x07; + if (argc == 3) { + intv = extract_non_neg_int(argv[2], 0); + } - if ((ffi < 0) || (ffi > 3) || (sfi < 0) || (sfi > 3)) { + if ((ffi < 0) || (ffi > 3) || (sfi < 0) || (sfi > 3) || + (intv < 0) || (intv > 7)) { printf(usage); return; } - chu_cfg->sense.filter = (ffi << 4) | sfi; + chu_cfg->sense.filter = (ffi << 6) | (sfi << 4) | intv; slider_update_config(); config_changed(); diff --git a/firmware/src/mpr121.c b/firmware/src/mpr121.c index 215db6a..0d1ebba 100644 --- a/firmware/src/mpr121.c +++ b/firmware/src/mpr121.c @@ -174,7 +174,7 @@ static uint8_t mpr121_resume(uint8_t addr, uint8_t ecr) write_reg(addr, MPR121_ELECTRODE_CONFIG_REG, ecr); } -void mpr121_filter(uint8_t addr, uint8_t ffi, uint8_t sfi) +void mpr121_filter(uint8_t addr, uint8_t ffi, uint8_t sfi, uint8_t esi) { uint8_t ecr = mpr121_stop(addr); @@ -183,7 +183,8 @@ void mpr121_filter(uint8_t addr, uint8_t ffi, uint8_t sfi) uint8_t acc = read_reg(addr, MPR121_AUTOCONFIG_CONTROL_0_REG); write_reg(addr, MPR121_AUTOCONFIG_CONTROL_0_REG, (acc & 0x3f) | ffi << 6); uint8_t fcr = read_reg(addr, MPR121_FILTER_CONFIG_REG); - write_reg(addr, MPR121_FILTER_CONFIG_REG, (fcr & 0xe7) | (sfi & 3) << 3); + write_reg(addr, MPR121_FILTER_CONFIG_REG, + (fcr & 0xe0) | ((sfi & 3) << 3) | esi); mpr121_resume(addr, ecr); } diff --git a/firmware/src/mpr121.h b/firmware/src/mpr121.h index 5c47ef6..2156999 100644 --- a/firmware/src/mpr121.h +++ b/firmware/src/mpr121.h @@ -11,8 +11,7 @@ void mpr121_init(uint8_t addr); uint16_t mpr121_touched(uint8_t addr); void mpr121_raw(uint8_t addr, uint16_t *raw, int num); - -void mpr121_filter(uint8_t addr, uint8_t ffi, uint8_t sfi); +void mpr121_filter(uint8_t addr, uint8_t ffi, uint8_t sfi, uint8_t esi); void mpr121_sense(uint8_t addr, int8_t sense, int8_t *sense_keys); void mpr121_debounce(uint8_t addr, uint8_t touch, uint8_t release); diff --git a/firmware/src/slider.c b/firmware/src/slider.c index ba55e29..4c3ce89 100644 --- a/firmware/src/slider.c +++ b/firmware/src/slider.c @@ -93,8 +93,10 @@ void slider_update_config() for (int m = 0; m < 3; m++) { mpr121_debounce(MPR121_ADDR + m, chu_cfg->sense.debounce_touch, chu_cfg->sense.debounce_release); - mpr121_sense(MPR121_ADDR + m, chu_cfg->sense.global, chu_cfg->sense.keys + m * 12); - mpr121_filter(MPR121_ADDR + m, chu_cfg->sense.filter & 0x0f, - (chu_cfg->sense.filter >> 4) & 0x0f); + mpr121_sense(MPR121_ADDR + m, chu_cfg->sense.global, + chu_cfg->sense.keys + m * 12); + mpr121_filter(MPR121_ADDR + m, chu_cfg->sense.filter >> 6, + (chu_cfg->sense.filter >> 4) & 0x03, + chu_cfg->sense.filter & 0x07); } }