Change to Pin assignements in shared.h
This commit is contained in:
1 parent
1d687b1fd9
commit
15f67f6c8c
3 files changed
+14
-12
No files matched your search
@@ -14,17 +14,17 @@
|
||||
#include "hardware/flash.h"
|
||||
#include "hardware/irq.h"
|
||||
#define _125M 125000000
|
||||
#define DCC_INPUT_PIN 9u
|
||||
#define MOTOR_FWD_PIN 22u
|
||||
#define MOTOR_REV_PIN 23u
|
||||
#define FWD_V_EMF_ADC_PIN 26u
|
||||
#define REV_V_EMF_ADC_PIN 27u
|
||||
//Aux output pins
|
||||
#define AUX_PIN_MASK 0b00000000000000000011110000000000
|
||||
#define DCC_INPUT_PIN 21u
|
||||
#define MOTOR_FWD_PIN 23u
|
||||
#define MOTOR_REV_PIN 22u
|
||||
#define FWD_V_EMF_ADC_PIN 28u
|
||||
#define REV_V_EMF_ADC_PIN 29u
|
||||
//Aux output pins (GPIO 24,25,26,27)
|
||||
#define AUX_PIN_MASK (1u<<24) | (1u<<25) | (1u<<26) | (1u<<27)
|
||||
//GPIO pins configured as inputs (Input functionality not implemented yet)
|
||||
#define GPIO_INPUT_MASK 0b00000000000000000000000000000000
|
||||
//GPIO pins configured as outputs
|
||||
#define GPIO_OUTPUT_MASK 0b00000000000000000000000000111111
|
||||
#define GPIO_OUTPUT_MASK 0b00000000000000000000000000000000
|
||||
//GPIO pin mask to prevent setting illegal GPIOs (ADC, Motor, DCC Input Pin)
|
||||
#define GPIO_ILLEGAL_MASK (1u<<DCC_INPUT_PIN) | (1u<<MOTOR_FWD_PIN) | (1u<<MOTOR_REV_PIN) | (1u<<FWD_V_EMF_ADC_PIN) | (1u<<REV_V_EMF_ADC_PIN)
|
||||
//GPIO pin mask with allowed outputs (AUX & GPIO (configured as outputs))
|
||||
|
||||
Reference in new issue
Block a user