Skip to content

Commit b6f98a2

Browse files
committed
Address review comments
1 parent 7706293 commit b6f98a2

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

dynalib/inc/dynalib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ constexpr T2* dynalib_checked_cast(T2 *p) {
125125
#define __S(x) #x
126126
#define __SX(x) __S(x)
127127

128-
#if HAL_PLATFORM_DYNALIB_DYNAMIC_LOCATION
128+
#if PLATFORM_ID == 32 || PLATFORM_ID == 28
129129
#define DYNALIB_FN_IMPORT(index, tablename, name, counter) \
130130
DYNALIB_STATIC_ASSERT(index == counter, "Index of the dynamically exported function has changed"); \
131131
const char check_name_##tablename_##name[0]={}; /* this will fail if the name is already defined */ \

hal/shared/demux.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ int Demux::write(uint8_t pin, uint8_t value) {
6464
#if HAL_PLATFORM_NRF52840
6565
nrf_gpio_port_out_set(DEMUX_NRF_PORT, ((uint32_t)pin) << DEMUX_PINS_SHIFT);
6666
#elif HAL_PLATFORM_RTL872X
67-
hal_gpio_write(DEMUX_C, pin >> 2);
68-
hal_gpio_write(DEMUX_B, (pin >> 1) & 1);
69-
hal_gpio_write(DEMUX_A, pin & 1);
67+
hal_gpio_write(DEMUX_C, (pin & DEMUX_PIN_2_MASK) ? 1 : 0);
68+
hal_gpio_write(DEMUX_B, (pin & DEMUX_PIN_1_MASK) ? 1 : 0);
69+
hal_gpio_write(DEMUX_A, (pin & DEMUX_PIN_0_MASK) ? 1 : 0);
7070
#endif
7171
setPinValue(pin, 0);
7272
}

hal/shared/demux.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@
3333
#define DEMUX_MAX_PIN_COUNT 8
3434
#if HAL_PLATFORM_NRF52840
3535
#define DEMUX_NRF_PORT (NRF_P1)
36+
#endif
3637
#define DEMUX_PIN_0_MASK 0x00000400
3738
#define DEMUX_PIN_1_MASK 0x00000800
3839
#define DEMUX_PIN_2_MASK 0x00001000
3940
#define DEMUX_PINS_SHIFT (10)
40-
#endif
41+
4142

4243
namespace particle {
4344

hal/src/tron/hal_platform_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define HAL_PLATFORM_USART_NUM (3)
1616
#define HAL_PLATFORM_NCP_COUNT (1)
1717
#define HAL_PLATFORM_BROKEN_MTU (1)
18+
#define HAL_PLATFORM_WIFI (1)
1819
#define HAL_PLATFORM_WIFI_COMPAT (1)
1920

2021
#define HAL_PLATFORM_RADIO_ANTENNA_INTERNAL (1)

platform/MCU/rtl872x/inc/platform_config.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@
4747

4848
#define SYSTICK_IRQ_PRIORITY 7 //CORTEX_M33 Systick Interrupt
4949

50-
#if HAL_PLATFORM_RTL872X
51-
#define INTERNAL_FLASH_SIZE (0x800000)
52-
#else
53-
#pragma message "PLATFORM_ID is " PREPSTRING(PLATFORM_ID)
54-
#error "Unknown PLATFORM_ID"
55-
#endif
50+
// Currently works with platforms P2 and TrackerM
51+
#define INTERNAL_FLASH_SIZE (0x800000)
5652

5753
//Push Buttons, use interrupt HAL
5854
#define BUTTON1_PIN BTN

0 commit comments

Comments
 (0)