mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
* Remove unused includes * Adding in submodule * Move fusb functions to the BSP * Remove old code * Creating IronOS PD integration wrapper * Redirect to wrapper * pd lib updates * fix Docker build * Finish linking across * Cleanup * Update Makefile * Update push.yml * Update push.yml * PD -> Compensate for different tick rates * Update codeql-analysis.yml * Fix PD #define for @Firebie * Check irq low at start * Update BSP.h * Update main.cpp * Closer delay * Update OLED.cpp * Bugfix trying to start QC too early * Missing fusb shouldnt hang qc * Update FreeRTOSConfig.h * Update the GD drivers * Update Pinecil IRQ setup * Redirect printf() to uart * Update Power.cpp * Adding extras to PD state * Update USBPD.cpp * Delay in printf * Iterate once before delay on start * Update usb-pd * master usb-pd now * Format gd libs * Update gd32vf103_bkp.c * Guard with PD timeout * Remove CodeQL * Slow for testing, fix runt pulses at start * Fix runt pulse in read size 1 * Cleaner probing setup * Testing delay during stop gen in read 1 * Update I2C driver * Update gd32vf103_i2c.c * Cleaning up i2c wrapper a little, given up on dma for rx * Update preRTOS.cpp * Update Setup.cpp * Update MOVThread.cpp * Slow down UART to work with new clock config * Better ack setup for 2 byte read * Cleanup POW_PD so cant be lost in #includes * tipResistance -> TIP_RESISTANCE * handle NOP race on len==2 * Update configuration.h * Dont use neg timeout to mask anymore * Not required for MHP * Fix up source display Miniware * Fix race on PD init * Update POWThread.cpp * Update formatting * MHP format * Update push.yml * Faster TS80P I2C * Bugfix for IRQ handlers * Correctly handle I2C race on PD access * Fix CI error (unused var) and MHP IRQ * Test Pinecil alt ADC mode
125 lines
4.5 KiB
C
125 lines
4.5 KiB
C
/*
|
|
* Pins.h
|
|
*
|
|
* Created on: 29 May 2020
|
|
* Author: Ralim
|
|
*/
|
|
|
|
#ifndef BSP_MINIWARE_PINS_H_
|
|
#define BSP_MINIWARE_PINS_H_
|
|
#include "configuration.h"
|
|
|
|
#ifdef MODEL_TS100
|
|
|
|
#define KEY_B_Pin GPIO_PIN_6
|
|
#define KEY_B_GPIO_Port GPIOA
|
|
#define TMP36_INPUT_Pin GPIO_PIN_7
|
|
#define TMP36_INPUT_GPIO_Port GPIOA
|
|
#define TMP36_ADC1_CHANNEL ADC_CHANNEL_7
|
|
#define TMP36_ADC2_CHANNEL ADC_CHANNEL_7
|
|
#define TIP_TEMP_Pin GPIO_PIN_0
|
|
#define TIP_TEMP_GPIO_Port GPIOB
|
|
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_8
|
|
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_8
|
|
#define VIN_Pin GPIO_PIN_1
|
|
#define VIN_GPIO_Port GPIOB
|
|
#define VIN_ADC1_CHANNEL ADC_CHANNEL_9
|
|
#define VIN_ADC2_CHANNEL ADC_CHANNEL_9
|
|
#define OLED_RESET_Pin GPIO_PIN_8
|
|
#define OLED_RESET_GPIO_Port GPIOA
|
|
#define KEY_A_Pin GPIO_PIN_9
|
|
#define KEY_A_GPIO_Port GPIOA
|
|
#define INT_Orientation_Pin GPIO_PIN_3
|
|
#define INT_Orientation_GPIO_Port GPIOB
|
|
#define PWM_Out_Pin GPIO_PIN_4
|
|
#define PWM_Out_GPIO_Port GPIOB
|
|
#define PWM_Out_CHANNEL TIM_CHANNEL_1
|
|
#define PWM_Out_CCR
|
|
#define INT_Movement_Pin GPIO_PIN_5
|
|
#define INT_Movement_GPIO_Port GPIOB
|
|
#define SCL_Pin GPIO_PIN_6
|
|
#define SCL_GPIO_Port GPIOB
|
|
#define SDA_Pin GPIO_PIN_7
|
|
#define SDA_GPIO_Port GPIOB
|
|
#endif
|
|
#ifdef MODEL_TS80
|
|
// TS80 pin map
|
|
#define KEY_B_Pin GPIO_PIN_0
|
|
#define KEY_B_GPIO_Port GPIOB
|
|
#define TMP36_INPUT_Pin GPIO_PIN_4
|
|
#define TMP36_INPUT_GPIO_Port GPIOA
|
|
#define TMP36_ADC1_CHANNEL ADC_CHANNEL_4
|
|
#define TMP36_ADC2_CHANNEL ADC_CHANNEL_4
|
|
#define TIP_TEMP_Pin GPIO_PIN_3
|
|
#define TIP_TEMP_GPIO_Port GPIOA
|
|
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_3
|
|
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_3
|
|
|
|
#define VIN_Pin GPIO_PIN_2
|
|
#define VIN_GPIO_Port GPIOA
|
|
#define VIN_ADC1_CHANNEL ADC_CHANNEL_2
|
|
#define VIN_ADC2_CHANNEL ADC_CHANNEL_2
|
|
#define OLED_RESET_Pin GPIO_PIN_15
|
|
#define OLED_RESET_GPIO_Port GPIOA
|
|
#define KEY_A_Pin GPIO_PIN_1
|
|
#define KEY_A_GPIO_Port GPIOB
|
|
#define INT_Orientation_Pin GPIO_PIN_4
|
|
#define INT_Orientation_GPIO_Port GPIOB
|
|
#define PWM_Out_Pin GPIO_PIN_6
|
|
#define PWM_Out_GPIO_Port GPIOA
|
|
#define PWM_Out_CHANNEL TIM_CHANNEL_1
|
|
#define INT_Movement_Pin GPIO_PIN_5
|
|
#define INT_Movement_GPIO_Port GPIOB
|
|
#define SCL_Pin GPIO_PIN_6
|
|
#define SCL_GPIO_Port GPIOB
|
|
#define SDA_Pin GPIO_PIN_7
|
|
#define SDA_GPIO_Port GPIOB
|
|
#define SCL2_Pin GPIO_PIN_5
|
|
#define SCL2_GPIO_Port GPIOA
|
|
#define SDA2_Pin GPIO_PIN_1
|
|
#define SDA2_GPIO_Port GPIOA
|
|
|
|
#endif
|
|
#ifdef MODEL_TS80P
|
|
// TS80P pin map
|
|
#define KEY_B_Pin GPIO_PIN_0
|
|
#define KEY_B_GPIO_Port GPIOB
|
|
#define TMP36_INPUT_Pin GPIO_PIN_4
|
|
#define TMP36_INPUT_GPIO_Port GPIOA
|
|
#define TMP36_ADC1_CHANNEL ADC_CHANNEL_4
|
|
#define TMP36_ADC2_CHANNEL ADC_CHANNEL_4
|
|
#define TIP_TEMP_Pin GPIO_PIN_3
|
|
#define TIP_TEMP_GPIO_Port GPIOA
|
|
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_3
|
|
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_3
|
|
|
|
#define VIN_Pin GPIO_PIN_2
|
|
#define VIN_GPIO_Port GPIOA
|
|
#define VIN_ADC1_CHANNEL ADC_CHANNEL_2
|
|
#define VIN_ADC2_CHANNEL ADC_CHANNEL_2
|
|
#define OLED_RESET_Pin GPIO_PIN_15
|
|
#define OLED_RESET_GPIO_Port GPIOA
|
|
#define KEY_A_Pin GPIO_PIN_1
|
|
#define KEY_A_GPIO_Port GPIOB
|
|
#define INT_Orientation_Pin GPIO_PIN_4
|
|
#define INT_Orientation_GPIO_Port GPIOB
|
|
#define PWM_Out_Pin GPIO_PIN_6
|
|
#define PWM_Out_GPIO_Port GPIOA
|
|
#define PWM_Out_CHANNEL TIM_CHANNEL_1
|
|
#define INT_Movement_Pin GPIO_PIN_5
|
|
#define INT_Movement_GPIO_Port GPIOB
|
|
#define SCL_Pin GPIO_PIN_6
|
|
#define SCL_GPIO_Port GPIOB
|
|
#define SDA_Pin GPIO_PIN_7
|
|
#define SDA_GPIO_Port GPIOB
|
|
#define SCL2_Pin GPIO_PIN_5
|
|
#define SCL2_GPIO_Port GPIOA
|
|
#define SDA2_Pin GPIO_PIN_1
|
|
#define SDA2_GPIO_Port GPIOA
|
|
#define INT_PD_Pin GPIO_PIN_9
|
|
#define INT_PD_GPIO_Port GPIOA
|
|
|
|
#endif
|
|
|
|
#endif /* BSP_MINIWARE_PINS_H_ */
|