clang tested with mcb1800, add heap to lpc18 linker

This commit is contained in:
hathach
2024-04-22 18:08:41 +07:00
parent c097c85dcf
commit db30eee0fc
7 changed files with 64 additions and 38 deletions

View File

@@ -72,8 +72,7 @@ extern bool msc_app_init(void);
extern void msc_app_task(void);
/*------------- MAIN -------------*/
int main(void)
{
int main(void) {
board_init();
printf("TinyUSB Host MassStorage Explorer Example\r\n");
@@ -87,8 +86,7 @@ int main(void)
msc_app_init();
while (1)
{
while (1) {
// tinyusb host task
tuh_task();
@@ -103,28 +101,25 @@ int main(void)
// TinyUSB Callbacks
//--------------------------------------------------------------------+
void tuh_mount_cb(uint8_t dev_addr)
{
void tuh_mount_cb(uint8_t dev_addr) {
(void) dev_addr;
}
void tuh_umount_cb(uint8_t dev_addr)
{
void tuh_umount_cb(uint8_t dev_addr) {
(void) dev_addr;
}
//--------------------------------------------------------------------+
// Blinking Task
//--------------------------------------------------------------------+
void led_blinking_task(void)
{
void led_blinking_task(void) {
const uint32_t interval_ms = 1000;
static uint32_t start_ms = 0;
static bool led_state = false;
// Blink every interval ms
if ( board_millis() - start_ms < interval_ms) return; // not enough time
if (board_millis() - start_ms < interval_ms) return; // not enough time
start_ms += interval_ms;
board_led_write(led_state);