Create knock_config.h

This commit is contained in:
rusefillc 2024-04-17 23:49:53 -04:00 committed by GitHub
parent ffa374958b
commit 079d95c48f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

16
knock_config.h Normal file
View File

@ -0,0 +1,16 @@
/**
* @file knock_config.h
*/
#pragma once
// Knock is on ADC3
#define KNOCK_ADC ADCD3
// knock 1 - pin PA3
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN3
#define KNOCK_PIN_CH1 Gpio::A3
// Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84
#define KNOCK_SAMPLE_RATE (STM32_PCLK2 / (4 * (84 + 12)))