-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @file knock_config.h | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Knock is on ADC3 | ||
#define KNOCK_ADC ADCD3 | ||
|
||
// knock 1 - pin PF4 | ||
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN14 | ||
#define KNOCK_PIN_CH1 Gpio::F4 | ||
|
||
// knock 2 - pin PF5 | ||
#define KNOCK_HAS_CH2 true | ||
#define KNOCK_ADC_CH2 ADC_CHANNEL_IN15 | ||
#define KNOCK_PIN_CH2 Gpio::F5 | ||
|
||
// Sample rate & time - depends on the exact MCU | ||
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 | ||
#define KNOCK_SAMPLE_RATE (STM32_PCLK2 / (4 * (84 + 12))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#define TRIGGER_SCOPE_ADC ADCD3 | ||
|
||
#define TRIGGER_SCOPE_SAMPLE_TIME ADC_SAMPLE_144 | ||
|
||
#define TRIGGER_SCOPE_PIN_CH1 Gpio::F10 | ||
#define TRIGGER_SCOPE_ADC_CH1 ADC_CHANNEL_IN8 | ||
|
||
#define TRIGGER_SCOPE_HAS_CH2 false | ||
#define TRIGGER_SCOPE_ADC_CH2 ADC_CHANNEL_IN8 |