mirror of https://github.com/rusefi/wideband.git
f1_rev and threads (#173)
* f1_rev3: high speed (strenght) for heater PWM output * threads: set name for all thread * f1_dual: enalbe CH_CFG_USE_REGISTRY so GDB can see thread * f1_rev3: enalbe CH_CFG_USE_REGISTRY so GDB can see thread
This commit is contained in:
parent
1e3a227f50
commit
1aa7c661f6
|
@ -151,6 +151,8 @@ void AuxOutThread(void*)
|
|||
{
|
||||
const auto cfg = GetConfiguration();
|
||||
|
||||
chRegSetThreadName("Aux out");
|
||||
|
||||
while(1)
|
||||
{
|
||||
for (int ch = 0; ch < AFR_CHANNELS; ch++)
|
||||
|
|
|
@ -183,7 +183,7 @@ typedef int pid_t;
|
|||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#if !defined(CH_CFG_USE_REGISTRY)
|
||||
#define CH_CFG_USE_REGISTRY FALSE
|
||||
#define CH_CFG_USE_REGISTRY TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
* PB12 - Nernsr_4.2_esr_drive (digital input, no pull) - keep high-Z after power on
|
||||
* PB13..PB15 - unused
|
||||
*/
|
||||
#define VAL_GPIOBCRL 0x8A888200 /* PB7...PB0 */
|
||||
#define VAL_GPIOBCRL 0x8B888200 /* PB7...PB0 */
|
||||
#define VAL_GPIOBCRH 0x88843488 /* PB15...PB8 */
|
||||
#define VAL_GPIOBODR 0x0000FFFF
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ typedef int pid_t;
|
|||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#if !defined(CH_CFG_USE_REGISTRY)
|
||||
#define CH_CFG_USE_REGISTRY FALSE
|
||||
#define CH_CFG_USE_REGISTRY TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,6 +17,8 @@ static Configuration* configuration;
|
|||
static THD_WORKING_AREA(waCanTxThread, 256);
|
||||
void CanTxThread(void*)
|
||||
{
|
||||
chRegSetThreadName("CAN Tx");
|
||||
|
||||
while(1)
|
||||
{
|
||||
SendRusefiFormat(configuration->CanIndexOffset);
|
||||
|
@ -45,6 +47,8 @@ static float remoteBatteryVoltage = 0;
|
|||
static THD_WORKING_AREA(waCanRxThread, 512);
|
||||
void CanRxThread(void*)
|
||||
{
|
||||
chRegSetThreadName("CAN Rx");
|
||||
|
||||
while(1)
|
||||
{
|
||||
CANRxFrame frame;
|
||||
|
|
|
@ -196,6 +196,8 @@ static void HeaterThread(void*)
|
|||
{
|
||||
int ch;
|
||||
|
||||
chRegSetThreadName("Heater");
|
||||
|
||||
// Wait for temperature sensing to stabilize so we don't
|
||||
// immediately think we overshot the target temperature
|
||||
chThdSleepMilliseconds(1000);
|
||||
|
|
|
@ -26,6 +26,8 @@ static struct pump_control_state state[AFR_CHANNELS] =
|
|||
static THD_WORKING_AREA(waPumpThread, 256);
|
||||
static void PumpThread(void*)
|
||||
{
|
||||
chRegSetThreadName("Pump");
|
||||
|
||||
while(true)
|
||||
{
|
||||
for (int ch = 0; ch < AFR_CHANNELS; ch++)
|
||||
|
|
|
@ -37,6 +37,8 @@ static void SamplingThread(void*)
|
|||
float r_2[AFR_CHANNELS] = {0};
|
||||
float r_3[AFR_CHANNELS] = {0};
|
||||
|
||||
chRegSetThreadName("Sampling");
|
||||
|
||||
/* GD32: Insert 20us delay after ADC enable */
|
||||
chThdSleepMilliseconds(1);
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ static char printBuffer[200];
|
|||
static THD_WORKING_AREA(waUartThread, 512);
|
||||
static void UartThread(void*)
|
||||
{
|
||||
chRegSetThreadName("UART debug");
|
||||
|
||||
// in UART_DEBUG mode we only support Serial - this file name here has a bit of a confusing naming
|
||||
sdStart(&SD1, &cfg);
|
||||
|
||||
|
|
Loading…
Reference in New Issue