1
0
forked from me/IronOS
* Refactor I2C_SOFT to new #define

* Stitch in some of TS101

Update ShowStartupWarnings.cpp

Update OLED.hpp

Update stm32f1xx_hal_msp.c

Update Setup.cpp

Update Power.cpp

Update Pins.h

Update configuration.h

Power Muxing

Working dual input Voltage handler

Scan mode required for differing injected channels

Inject both dc readings

Update configuration.h

Update configuration.h

Use htim4 for adc control on TS101

Refactor htim names

Add ADC_TRIGGER

Speed up BB I2C a lil

Update configuration.h

Update startup_stm32f103t8ux.S

Update configuration.h

Add LIS2DH clone

LIS2DH gains another clone

Create tooling to allow mapping accelerometers onto different buses

Update startup_stm32f103t8ux.S

Ensure PD IRQ is pulled up

* Stitch in some of TS101

Update ShowStartupWarnings.cpp

Update OLED.hpp

Update stm32f1xx_hal_msp.c

Update Setup.cpp

Update Power.cpp

Update Pins.h

Update configuration.h

Power Muxing

Working dual input Voltage handler

Scan mode required for differing injected channels

Inject both dc readings

Update configuration.h

Update configuration.h

Use htim4 for adc control on TS101

Refactor htim names

Add ADC_TRIGGER

Speed up BB I2C a lil

Update configuration.h

Update startup_stm32f103t8ux.S

Update configuration.h

Add LIS2DH clone

LIS2DH gains another clone

Create tooling to allow mapping accelerometers onto different buses

Update startup_stm32f103t8ux.S

Ensure PD IRQ is pulled up

Allow toggle which button enters PD debug

* Update Pins.h

* Fix hard coded IRQ Pin

Update stm32f1xx_it.c

* Enable EPR

* Tip resistance measurement

* TS101 is a direct drive tip

Update BSP.cpp

* Add S60 and TS101 to builds

Update push.yml

* Update MOVThread.cpp

* Refactor power menu handler

* Correct prescaler

Forgot to update since I changed the period

* Tune in the timer divider for tip control to make PWM less audible

---------

Co-authored-by: discip <53649486+discip@users.noreply.github.com>
This commit is contained in:
Ben V. Brown
2023-06-18 21:58:20 +10:00
committed by GitHub
parent a1b9e40f67
commit d3d8e3d2d5
38 changed files with 1130 additions and 332 deletions

View File

@@ -10,14 +10,14 @@
#include "BSP.h"
#include "configuration.h"
#include "stm32f1xx_hal.h"
#ifdef I2C_SOFT
#ifdef I2C_SOFT_BUS_2
#define SOFT_SCL_HIGH() HAL_GPIO_WritePin(SCL2_GPIO_Port, SCL2_Pin, GPIO_PIN_SET)
#define SOFT_SCL_LOW() HAL_GPIO_WritePin(SCL2_GPIO_Port, SCL2_Pin, GPIO_PIN_RESET)
#define SOFT_SDA_HIGH() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_SET)
#define SOFT_SDA_LOW() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_RESET)
#define SOFT_SDA_READ() (HAL_GPIO_ReadPin(SDA2_GPIO_Port, SDA2_Pin) == GPIO_PIN_SET ? 1 : 0)
#define SOFT_SCL_READ() (HAL_GPIO_ReadPin(SCL2_GPIO_Port, SCL2_Pin) == GPIO_PIN_SET ? 1 : 0)
#define SOFT_SCL2_HIGH() HAL_GPIO_WritePin(SCL2_GPIO_Port, SCL2_Pin, GPIO_PIN_SET)
#define SOFT_SCL2_LOW() HAL_GPIO_WritePin(SCL2_GPIO_Port, SCL2_Pin, GPIO_PIN_RESET)
#define SOFT_SDA2_HIGH() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_SET)
#define SOFT_SDA2_LOW() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_RESET)
#define SOFT_SDA2_READ() (HAL_GPIO_ReadPin(SDA2_GPIO_Port, SDA2_Pin) == GPIO_PIN_SET ? 1 : 0)
#define SOFT_SCL2_READ() (HAL_GPIO_ReadPin(SCL2_GPIO_Port, SCL2_Pin) == GPIO_PIN_SET ? 1 : 0)
#define SOFT_I2C_DELAY() \
{ \
for (int xx = 0; xx < 12; xx++) { \

View File

@@ -155,10 +155,11 @@
#define OLED_128x32
#define GPIO_VIBRATION
#define POW_PD_EXT 1
#define POW_PD_EXT 1
#define DEBUG_POWER_MENU_BUTTON_B 1
#define HAS_POWER_DEBUG_MENU
#define TEMP_NTC
#define I2C_SOFT // For now we are doing software I2C to get around hardware chip issues
#define I2C_SOFT_BUS_2 // For now we are doing software I2C to get around hardware chip issues
#define OLED_I2CBB
#define MODEL_HAS_DCDC // We dont have DC/DC but have reallly fast PWM that gets us roughly the same place

View File

@@ -6,7 +6,7 @@
*/
#include "BSP.h"
#include "I2CBB.hpp"
#include "I2CBB2.hpp"
#include "Pins.h"
#include "Setup.h"
#include <I2C_Wrapper.hpp>
@@ -17,8 +17,8 @@ void preRToSInit() {
HAL_Init();
Setup_HAL(); // Setup all the HAL objects
BSPInit();
#ifdef I2C_SOFT
I2CBB::init();
#ifdef I2C_SOFT_BUS_2
I2CBB2::init();
#endif
/* Init the IPC objects */
FRToSI2C::FRToSInit();