Files
RP2040-Decoder/decoder.h
T
GabrielKoppenstein f81cf7fb0b - renamed multicore.c to decoder.c and header files respectively
- several changes to pid_control and speed_helper
- measurements are now being "filtered" (x smallest and y biggest values will be discarded to counteract noisy measurements)
- irq priority for core1 adjusted (pid_control irq now has highest priority)
2022-01-06 20:34:44 +01:00

22 lines
955 B
C

//////////////////////////
// RP2040-Decoder //
// Gabriel Koppenstein //
//////////////////////////
#pragma once
#define SIZE_BYTE_ARRAY 5
#define SIZE_ACTIVE_FUNCTIONS 69
#define DCC_INPUT_PIN 11
#define MOTOR_PWM_FORWARD 10
#define MOTOR_PWM_REVERSE 13
#define V_EMF_ADC_PIN_FORWARD 26
#define V_EMF_ADC_PIN_REVERSE 27
#define PACKAGE_3_BYTES 0b11111111110000000000000000000000000001
#define PACKAGE_MASK_3_BYTES 0b11111111111000000001000000001000000001
#define PACKAGE_4_BYTES 0b11111111110000000000000000000000000000000000001
#define PACKAGE_MASK_4_BYTES 0b11111111111000000001000000001000000001000000001
#define PACKAGE_5_BYTES 0b11111111110000000000000000000000000000000000000000000001
#define PACKAGE_MASK_5_BYTES 0b11111111111000000001000000001000000001000000001000000001
#define FLASH_TARGET_OFFSET (PICO_FLASH_SIZE_BYTES-FLASH_SECTOR_SIZE) //This Offset should be far enough away from program data
void core1_entry();
void evaluation();