diff --git a/workspace/TS100/Core/BSP/BSP.h b/workspace/TS100/Core/BSP/BSP.h index f0c427dc..5fde786d 100644 --- a/workspace/TS100/Core/BSP/BSP.h +++ b/workspace/TS100/Core/BSP/BSP.h @@ -63,6 +63,7 @@ uint8_t showBootLogoIfavailable(); void delay_ms(uint16_t count) ; //Used to allow knowledge of if usb_pd is being used uint8_t usb_pd_detect(); +bool getHallSensorFitted(); // If the iron has a hall effect sensor in the handle, return an signed count of the reading // If the sensor is single polarity (or polarity insensitive) just return 0..32768 int16_t getRawHallEffect(); diff --git a/workspace/TS100/Core/BSP/Pine64/Model_Config.h b/workspace/TS100/Core/BSP/Pine64/Model_Config.h index 2c6a0c84..7587cc60 100644 --- a/workspace/TS100/Core/BSP/Pine64/Model_Config.h +++ b/workspace/TS100/Core/BSP/Pine64/Model_Config.h @@ -21,7 +21,7 @@ #define TEMP_TMP36 #define ACCEL_BMA #define HALL_SENSOR -#define HALL_SI7210 +//#define HALL_SI7210 #define BATTFILTERDEPTH 32 #endif diff --git a/workspace/TS100/Core/BSP/Pine64/postRTOS.cpp b/workspace/TS100/Core/BSP/Pine64/postRTOS.cpp index 5914270f..13fcacf3 100644 --- a/workspace/TS100/Core/BSP/Pine64/postRTOS.cpp +++ b/workspace/TS100/Core/BSP/Pine64/postRTOS.cpp @@ -31,3 +31,7 @@ int16_t getRawHallEffect() { return 0; } + +bool getHallSensorFitted() { + return hall_effect_present; +} diff --git a/workspace/TS100/GD32VF103xB.ld b/workspace/TS100/GD32VF103xB.ld index 83ce13a0..204f7ca8 100644 --- a/workspace/TS100/GD32VF103xB.ld +++ b/workspace/TS100/GD32VF103xB.ld @@ -7,11 +7,6 @@ MEMORY /* Run in FLASH */ flash (rxai!w) : ORIGIN = 0x08000000, LENGTH = 128k ram (wxa!ri) : ORIGIN = 0x20000000, LENGTH = 32K - - /* Run in RAM */ -/* flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 24k - ram (wxa!ri) : ORIGIN = 0x20006000, LENGTH = 8K -*/ } @@ -173,4 +168,4 @@ SECTIONS . = __stack_size; PROVIDE( _sp = . ); } >ram AT>ram -} +} \ No newline at end of file