mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-14 18:54:18 +00:00
Add frdm-mcxw71 support
This commit is contained in:
1 parent
38c326644f
commit
a6b6a0d779
6 files changed
+343
No files matched your search
@@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2026 Cesanta Software Limited
|
||||
// All rights reserved
|
||||
|
||||
#include "hal.h"
|
||||
#include "mongoose.h"
|
||||
|
||||
#define UART_DEBUG LPUART1 // MCU-Link USB serial port
|
||||
|
||||
static void log_fn(char ch, void *param) {
|
||||
hal_uart_write_buf(param, &ch, 1);
|
||||
}
|
||||
|
||||
uint64_t mg_millis(void) {
|
||||
return hal_get_tick();
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
hal_clock_init();
|
||||
hal_uart_init(UART_DEBUG, 115200);
|
||||
mg_log_set_fn(log_fn, UART_DEBUG);
|
||||
|
||||
MG_INFO(("Initialised. CPU clock: %lu MHz", SystemCoreClock / 1000000));
|
||||
MG_INFO(("RAM used: %zu, free: %zu", hal_ram_used(), hal_ram_free()));
|
||||
|
||||
for (;;) {
|
||||
static uint64_t timer;
|
||||
if (hal_timer_expired(&timer, 1000, hal_get_tick())) {
|
||||
MG_INFO(("Hi from Mongoose, tick %llu", hal_get_tick()));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user