Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts: # firmware/hw_layer/digital_input/trigger/trigger_input.h # firmware/hw_layer/hw_layer.mk # firmware/hw_layer/ports/stm32/stm32f0/hw_ports.mk # firmware/hw_layer/ports/stm32/stm32f1/hw_ports.mk # firmware/hw_layer/ports/stm32/stm32f4/hw_ports.mk # firmware/hw_layer/ports/stm32/stm32f7/hw_ports.mk
This commit is contained in:
commit
e94631ad3d
|
@ -34,6 +34,9 @@ typedef enum {
|
|||
BACKUP_CJ125_CALIBRATION_HEATER,
|
||||
|
||||
DFU_JUMP_REQUESTED,
|
||||
|
||||
/* The number of stored backup variables */
|
||||
BACKUP_RAM_NUM,
|
||||
} backup_ram_e;
|
||||
|
||||
|
||||
|
@ -41,4 +44,6 @@ typedef enum {
|
|||
uint32_t backupRamLoad(backup_ram_e idx);
|
||||
// use backup-power RTC registers (non-volatile memory) to store the data
|
||||
void backupRamSave(backup_ram_e idx, uint32_t value);
|
||||
// make sure that all changes are saved before we shutdown the MCU
|
||||
void backupRamFlush(void);
|
||||
|
||||
|
|
|
@ -19,3 +19,17 @@ void turnOnTriggerInputPins(Logging *sharedLogger);
|
|||
void applyNewTriggerInputPins(void);
|
||||
void startTriggerInputPins(void);
|
||||
void stopTriggerInputPins(void);
|
||||
|
||||
#if HAL_TRIGGER_USE_ADC && HAL_USE_ADC
|
||||
// This detector has 2 modes for low-RPM (ADC) and fast-RPM (EXTI)
|
||||
enum triggerAdcMode_t {
|
||||
TRIGGER_NONE = 0,
|
||||
TRIGGER_ADC,
|
||||
TRIGGER_EXTI,
|
||||
};
|
||||
|
||||
adc_channel_e getAdcChannelForTrigger(void);
|
||||
void addAdcChannelForTrigger(void);
|
||||
void triggerAdcCallback(adcsample_t value);
|
||||
#endif /* HAL_USE_ADC */
|
||||
|
||||
|
|
|
@ -181,6 +181,7 @@ void printSpiConfig(Logging *logging, const char *msg, spi_device_e device) {
|
|||
scheduleMsg(logging, "%s %s sck=%s", msg, getSpi_device_e(device), hwPortname(getSckPin(device)));
|
||||
}
|
||||
|
||||
|
||||
const char *hwPortname(brain_pin_e brainPin) {
|
||||
if (brainPin == GPIO_INVALID) {
|
||||
return "INVALID";
|
||||
|
@ -200,6 +201,7 @@ const char *hwPortname(brain_pin_e brainPin) {
|
|||
}
|
||||
#if (BOARD_EXT_GPIOCHIPS > 0)
|
||||
else {
|
||||
|
||||
const char *pin_name = gpiochips_getPinName(brainPin);
|
||||
|
||||
if (pin_name) {
|
||||
|
|
Loading…
Reference in New Issue