Skip to content

Commit 50c19c5

Browse files
author
Owen L - SFE
committed
fix compilation issues from transition to HAL 2.2.0
1 parent c483bba commit 50c19c5

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

cores/arduino/am_sdk_ap3/mcu/apollo3/hal/am_hal_iom.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
#include "am_hal_status.h"
5656
#include "am_hal_sysctrl.h"
5757

58+
#ifdef __cplusplus // Patch
59+
extern "C" {
60+
#endif // End patch
5861

5962
//*****************************************************************************
6063
//
@@ -831,4 +834,9 @@ uint32_t am_hal_iom_highprio_transfer(void *pHandle,
831834
//! @}
832835
//
833836
//*****************************************************************************
837+
838+
#ifdef __cplusplus // Patch
839+
}
840+
#endif // End patch
841+
834842
#endif // AM_HAL_IOM_H

cores/arduino/ard_sup/ap3_uart.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ SOFTWARE.
3535

3636
typedef RingBufferN<AP3_UART_RINGBUFF_SIZE> AP3UartRingBuffer;
3737

38+
extern char ap3_g_prfbuf[AM_PRINTF_BUFSIZE];
39+
3840
extern const am_hal_uart_config_t ap3_uart_config_default;
3941

4042
extern const ap3_uart_pad_map_elem_t ap3_uart0_tx_map[AP3_UART0_NUM_TX_PADS];

cores/arduino/ard_sup/uart/ap3_uart.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@ uint32_t Uart::printf(const char *pcFmt, ...)
417417
//
418418
va_list pArgs;
419419
va_start(pArgs, pcFmt);
420-
ui32NumChars = am_util_stdio_vsprintf(g_prfbuf, pcFmt, pArgs);
420+
ui32NumChars = am_util_stdio_vsprintf(ap3_g_prfbuf, pcFmt, pArgs);
421421
va_end(pArgs);
422422

423-
write((const uint8_t *)g_prfbuf, ui32NumChars);
423+
write((const uint8_t *)ap3_g_prfbuf, ui32NumChars);
424424

425425
return ui32NumChars;
426426
}

0 commit comments

Comments
 (0)