* Basic Init * Rought implementation of fs2711 usb pd interface * Rought implementation of fs2711 usb pd interface * Still needs work overcurrent protection keeps getting tripped * New pdo selection logic * Update push.yml * Update push.yml * Update push.yml * Update Makefile * Adds PPS * Removed unused define * Adds PPS * Apply suggestions from code review Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com> * Code review changes * Added osDelay include * New line alignment for S60 softwarei2c * Code review * Fixes code review stuff * code review changes * Change voltage limit to 20 as that's what the device is rated for * Shortened wait time for usb pd * Fixed issues that cuase S60P to restart constantly * fixing minimal OLED brightness With the current settings, the OLED turns off if the first level is selected. * Adds protocol to s60p debug menu * loosened fs2711 protocol selection timing * Adds PDO register reading to negotiation logic * Fixes FS2711 timeout issue and cleans up driver * Adds FS2711 protocol negotiation to power loop * Removed uneeded define * Reverts changes to Font.h and adds clang-format comments --------- Co-authored-by: Ben V. Brown <Ralim@Ralimtek.com> Co-authored-by: discip <53649486+discip@users.noreply.github.com> Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
74 lines
2.4 KiB
C
74 lines
2.4 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_S60
|
|
|
|
#define KEY_B_Pin GPIO_PIN_1
|
|
#define KEY_B_GPIO_Port GPIOB
|
|
#define TMP36_INPUT_Pin GPIO_PIN_5
|
|
#define TMP36_INPUT_GPIO_Port GPIOA
|
|
#define TMP36_ADC1_CHANNEL ADC_CHANNEL_5
|
|
#define TMP36_ADC2_CHANNEL ADC_CHANNEL_5
|
|
#define TIP_TEMP_Pin GPIO_PIN_0
|
|
#define TIP_TEMP_GPIO_Port GPIOA
|
|
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_0
|
|
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_0
|
|
#define VIN_Pin GPIO_PIN_4
|
|
#define VIN_GPIO_Port GPIOA
|
|
#define VIN_ADC1_CHANNEL ADC_CHANNEL_4
|
|
#define VIN_ADC2_CHANNEL ADC_CHANNEL_4
|
|
#define KEY_A_Pin GPIO_PIN_0
|
|
#define KEY_A_GPIO_Port GPIOB
|
|
#define PWM_Out_Pin GPIO_PIN_8
|
|
#define PWM_Out_GPIO_Port GPIOB
|
|
#define PWM_Out_CHANNEL TIM_CHANNEL_3 // Timer 4; channel 3
|
|
#define SCL2_Pin GPIO_PIN_6
|
|
#define SCL2_GPIO_Port GPIOB
|
|
#define SDA2_Pin GPIO_PIN_7
|
|
#define SDA2_GPIO_Port GPIOB
|
|
// Pin gets pulled high on movement
|
|
#define MOVEMENT_Pin GPIO_PIN_3
|
|
#define MOVEMENT_GPIO_Port GPIOA
|
|
|
|
#endif
|
|
|
|
#ifdef MODEL_S60P
|
|
|
|
#define KEY_B_Pin GPIO_PIN_1
|
|
#define KEY_B_GPIO_Port GPIOB
|
|
#define TMP36_INPUT_Pin GPIO_PIN_5
|
|
#define TMP36_INPUT_GPIO_Port GPIOA
|
|
#define TMP36_ADC1_CHANNEL ADC_CHANNEL_5
|
|
#define TMP36_ADC2_CHANNEL ADC_CHANNEL_5
|
|
#define TIP_TEMP_Pin GPIO_PIN_0
|
|
#define TIP_TEMP_GPIO_Port GPIOA
|
|
#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_0
|
|
#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_0
|
|
#define VIN_Pin GPIO_PIN_4
|
|
#define VIN_GPIO_Port GPIOA
|
|
#define VIN_ADC1_CHANNEL ADC_CHANNEL_4
|
|
#define VIN_ADC2_CHANNEL ADC_CHANNEL_4
|
|
#define KEY_A_Pin GPIO_PIN_0
|
|
#define KEY_A_GPIO_Port GPIOB
|
|
#define PWM_Out_Pin GPIO_PIN_8
|
|
#define PWM_Out_GPIO_Port GPIOB
|
|
#define PWM_Out_CHANNEL TIM_CHANNEL_3 // Timer 4; channel 3
|
|
#define SCL2_Pin GPIO_PIN_6
|
|
#define SCL2_GPIO_Port GPIOB
|
|
#define SDA2_Pin GPIO_PIN_7
|
|
#define SDA2_GPIO_Port GPIOB
|
|
// Pin gets pulled high on movement
|
|
#define MOVEMENT_Pin GPIO_PIN_3
|
|
#define MOVEMENT_GPIO_Port GPIOA
|
|
|
|
#endif
|
|
#endif /* BSP_MINIWARE_PINS_H_ */
|