Implemented stable IR receiving over SAADC with PPI timing
All checks were successful
Deploy Docs / build-and-deploy (push) Successful in 13s
All checks were successful
Deploy Docs / build-and-deploy (push) Successful in 13s
This commit is contained in:
@@ -40,6 +40,48 @@ if IR_RECV
|
||||
help
|
||||
Invert logic: High-level means IR carrier detected.
|
||||
|
||||
config IR_RECV_THREAD_PRIO_SIM
|
||||
int "Simulator thread priority"
|
||||
default 4
|
||||
range 0 20
|
||||
help
|
||||
Thread priority for the IR receive simulator.
|
||||
|
||||
config IR_RECV_THREAD_STACK_SIM
|
||||
int "Simulator thread stack size"
|
||||
default 1024
|
||||
range 256 8192
|
||||
help
|
||||
Stack size in bytes for the IR receive simulator thread.
|
||||
|
||||
config IR_RECV_THREAD_PRIO_ADC
|
||||
int "ADC sampling thread priority"
|
||||
default 2
|
||||
range -10 10
|
||||
help
|
||||
Thread priority for hardware ADC sampling.
|
||||
|
||||
config IR_RECV_THREAD_STACK_ADC
|
||||
int "ADC sampling thread stack size"
|
||||
default 1024
|
||||
range 256 8192
|
||||
help
|
||||
Stack size in bytes for the hardware ADC sampling thread.
|
||||
|
||||
config IR_RECV_THREAD_PRIO_PROCESS
|
||||
int "IR processing thread priority"
|
||||
default 5
|
||||
range -10 10
|
||||
help
|
||||
Thread priority for IR buffer processing.
|
||||
|
||||
config IR_RECV_THREAD_STACK_PROCESS
|
||||
int "IR processing thread stack size"
|
||||
default 2048
|
||||
range 256 8192
|
||||
help
|
||||
Stack size in bytes for the IR processing thread.
|
||||
|
||||
# Logging configuration for the IR Receiver module
|
||||
module = IR_RECV
|
||||
module-str = ir_recv
|
||||
|
||||
@@ -162,7 +162,8 @@ void ir_recv_sim_thread(void *p1, void *p2, void *p3)
|
||||
}
|
||||
}
|
||||
}
|
||||
K_THREAD_DEFINE(sim_tid, 1024, ir_recv_sim_thread, NULL, NULL, NULL, 5, 0, 0);
|
||||
K_THREAD_DEFINE(sim_tid, CONFIG_IR_RECV_THREAD_STACK_SIM, ir_recv_sim_thread, NULL, NULL, NULL,
|
||||
CONFIG_IR_RECV_THREAD_PRIO_SIM, 0, 0);
|
||||
#endif // CONFIG_IR_RECV_SIMULATOR
|
||||
|
||||
#ifndef CONFIG_IR_RECV_SIMULATOR
|
||||
@@ -262,7 +263,8 @@ void hw_adc_thread(void *p1, void *p2, void *p3)
|
||||
k_sem_give(&adc_sem);
|
||||
}
|
||||
}
|
||||
K_THREAD_DEFINE(hw_adc_tid, 1024, hw_adc_thread, NULL, NULL, NULL, 5, 0, 0);
|
||||
K_THREAD_DEFINE(hw_adc_tid, CONFIG_IR_RECV_THREAD_STACK_ADC, hw_adc_thread, NULL, NULL, NULL,
|
||||
CONFIG_IR_RECV_THREAD_PRIO_ADC, 0, 0);
|
||||
|
||||
#endif // !CONFIG_IR_RECV_SIMULATOR
|
||||
|
||||
@@ -452,7 +454,8 @@ void ir_recv_thread(void *arg1, void *arg2, void *arg3)
|
||||
}
|
||||
}
|
||||
|
||||
K_THREAD_DEFINE(ir_recv_tid, 2048, ir_recv_thread, NULL, NULL, NULL, 2, 0, 0);
|
||||
K_THREAD_DEFINE(ir_recv_tid, CONFIG_IR_RECV_THREAD_STACK_PROCESS, ir_recv_thread, NULL, NULL, NULL,
|
||||
CONFIG_IR_RECV_THREAD_PRIO_PROCESS, 0, 0);
|
||||
|
||||
/**
|
||||
* @brief Initialization of the IR receiver module.
|
||||
|
||||
Reference in New Issue
Block a user