-updated readme, -modified F0-F31 handling, - implemented pwm for F0-F31

This commit is contained in:
1nct committed 2022-03-05 01:41:40 +01:00
1 parent 4f5283521d
commit a6fa9ef249
7 files changed
+224 -169

No files matched your search

+8 -2
View File
@@ -16,8 +16,14 @@
#include "hardware/irq.h"
#define _125M 125000000
#define ADC_OFFSET 13
#define MOTOR_FWD_PIN 22
#define MOTOR_REV_PIN 23
#define DCC_INPUT_PIN 4u
#define MOTOR_FWD_PIN 22u
#define MOTOR_REV_PIN 23u
#define FWD_V_EMF_ADC_PIN 26u
#define REV_V_EMF_ADC_PIN 27u
#define GPIO_USED 0b00001100110000000011111000011111u
#define GPIO_ILLEGAL (DCC_INPUT_PIN | MOTOR_FWD_PIN | MOTOR_REV_PIN | FWD_V_EMF_ADC_PIN | REV_V_EMF_ADC_PIN)
#define GPIO_ALLOWED GPIO_USED & ~GPIO_ILLEGAL //GPIO mask to prevent setting illegal GPIOs (ADC, Motor, DCC Input Pin)
#define FLASH_TARGET_OFFSET (PICO_FLASH_SIZE_BYTES-FLASH_SECTOR_SIZE) //This Offset should be far enough away from program data
extern repeating_timer_t pid_control_timer;
extern repeating_timer_t speed_helper_timer;