Skip to content

Commit

Permalink
SENT: only one channel
Browse files Browse the repository at this point in the history
To enalbe two channels we need to improve ICU driver first to
capture more than one TIM input.

See https://github.com/alex31/chibios_enac_various_common.git
inputCapture.c
  • Loading branch information
dron0gus committed Jan 6, 2025
1 parent a76c25b commit fbbac4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion firmware/boards/f1_dual_rev1/wideband_board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@
// *******************************
// SENT protocol receiver on analog inputs
// *******************************
#define SENT_INPUT_COUNT 2 // Number of sent channels
#define SENT_INPUT_COUNT 1 // Number of sent channels
4 changes: 3 additions & 1 deletion firmware/sent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static /* const */ ICUConfig icucfg[SENT_INPUT_COUNT] =
.arr = 0xFFFFFFFFU,
//.overcapture_cb = icuovercapture_in1,
},
#if 0
/* P1.A4 -> L_AUX -> L_AUX_ADC -> PA7 */
{
.mode = ICU_INPUT_ACTIVE_LOW,
Expand All @@ -118,13 +119,14 @@ static /* const */ ICUConfig icucfg[SENT_INPUT_COUNT] =
//.overcapture_cb = icuovercapture_in2,
}
#endif
#endif
};

static ICUDriver *icudrivers[SENT_INPUT_COUNT] =
{
#if (STM32_ICU_USE_TIM3 == TRUE)
&ICUD3,
&ICUD3,
//&ICUD3,
#else
nullptr,
nullptr,
Expand Down

0 comments on commit fbbac4b

Please sign in to comment.