mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
hack to undef LITTLE_ENDIAN for samg55
This commit is contained in:
parent
cc494ab585
commit
5fa1e6e242
@ -58,8 +58,11 @@
|
|||||||
#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
|
#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
|
||||||
#include "nrf.h"
|
#include "nrf.h"
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_SAMD21 || CFG_TUSB_MCU == OPT_MCU_SAMD51 || \
|
#elif CFG_TUSB_MCU == OPT_MCU_SAMD21 || CFG_TUSB_MCU == OPT_MCU_SAMD51
|
||||||
CFG_TUSB_MCU == OPT_MCU_SAMG
|
#include "sam.h"
|
||||||
|
|
||||||
|
#elif CFG_TUSB_MCU == OPT_MCU_SAMG
|
||||||
|
#undef LITTLE_ENDIAN // hack to suppress "LITTLE_ENDIAN" redefined
|
||||||
#include "sam.h"
|
#include "sam.h"
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32F0
|
#elif CFG_TUSB_MCU == OPT_MCU_STM32F0
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "ansi_escape.h"
|
#include "ansi_escape.h"
|
||||||
|
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
|
|
||||||
#define CFG_BOARD_UART_BAUDRATE 115200
|
#define CFG_BOARD_UART_BAUDRATE 115200
|
||||||
@ -68,18 +67,21 @@ int board_uart_write(void const * buf, int len);
|
|||||||
#if CFG_TUSB_OS == OPT_OS_NONE
|
#if CFG_TUSB_OS == OPT_OS_NONE
|
||||||
// Get current milliseconds, must be implemented when no RTOS is used
|
// Get current milliseconds, must be implemented when no RTOS is used
|
||||||
uint32_t board_millis(void);
|
uint32_t board_millis(void);
|
||||||
|
|
||||||
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
|
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
|
||||||
static inline uint32_t board_millis(void)
|
static inline uint32_t board_millis(void)
|
||||||
{
|
{
|
||||||
return ( ( ((uint64_t) xTaskGetTickCount()) * 1000) / configTICK_RATE_HZ );
|
return ( ( ((uint64_t) xTaskGetTickCount()) * 1000) / configTICK_RATE_HZ );
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif CFG_TUSB_OS == OPT_OS_MYNEWT
|
#elif CFG_TUSB_OS == OPT_OS_MYNEWT
|
||||||
static inline uint32_t board_millis(void)
|
static inline uint32_t board_millis(void)
|
||||||
{
|
{
|
||||||
return os_time_ticks_to_ms32( os_time_get() );
|
return os_time_ticks_to_ms32( os_time_get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Need to implement board_millis() for this OS"
|
#error "board_millis() is not implemented for this OS"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
@ -95,6 +97,7 @@ static inline void board_led_off(void)
|
|||||||
board_led_write(false);
|
board_led_write(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO remove
|
||||||
static inline void board_delay(uint32_t ms)
|
static inline void board_delay(uint32_t ms)
|
||||||
{
|
{
|
||||||
uint32_t start_ms = board_millis();
|
uint32_t start_ms = board_millis();
|
||||||
|
@ -39,7 +39,7 @@ VENDOR = nxp
|
|||||||
CHIP_FAMILY = lpc_ip3511
|
CHIP_FAMILY = lpc_ip3511
|
||||||
|
|
||||||
# For freeRTOS port source
|
# For freeRTOS port source
|
||||||
FREERTOS_PORT = ARM_CM33/non_secure
|
FREERTOS_PORT = ARM_CM33_NTZ/non_secure
|
||||||
|
|
||||||
# For flash-jlink target
|
# For flash-jlink target
|
||||||
JLINK_DEVICE = LPC55S69
|
JLINK_DEVICE = LPC55S69
|
||||||
|
@ -9,7 +9,8 @@ CFLAGS += \
|
|||||||
-D__SAMG55J19__ \
|
-D__SAMG55J19__ \
|
||||||
-DCFG_TUSB_MCU=OPT_MCU_SAMG
|
-DCFG_TUSB_MCU=OPT_MCU_SAMG
|
||||||
|
|
||||||
#CFLAGS += -Wno-error=undef
|
# suppress following warnings from mcu driver
|
||||||
|
CFLAGS += -Wno-error=undef
|
||||||
|
|
||||||
ASF_DIR = hw/mcu/microchip/samg55
|
ASF_DIR = hw/mcu/microchip/samg55
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user