log via usb
This commit is contained in:
parent
cecf2d079e
commit
4bd1d6f368
@ -34,11 +34,14 @@ project(blink C CXX ASM)
|
||||
pico_sdk_init()
|
||||
|
||||
# Add executable. Default name is the project name, version 0.1
|
||||
|
||||
add_executable(blink
|
||||
blink.c
|
||||
)
|
||||
|
||||
# Modify the below lines to enable/disable output over UART/USB
|
||||
pico_enable_stdio_uart(blink 0)
|
||||
pico_enable_stdio_usb(blink 1)
|
||||
|
||||
add_library(zig_library STATIC IMPORTED)
|
||||
set_property(TARGET zig_library PROPERTY IMPORTED_LOCATION ../zig-out/lib/libpicow_zig.a)
|
||||
|
||||
|
15
blink.c
15
blink.c
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "pico/stdlib.h"
|
||||
#include <pico/time.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@ -47,8 +48,18 @@ extern int32_t add(int32_t a, int32_t b);
|
||||
|
||||
int main() {
|
||||
stdio_init_all();
|
||||
printf("result from zig : %d\n", add(10, 31));
|
||||
return 0;
|
||||
|
||||
// Initialise the Wi-Fi chip
|
||||
if (cyw43_arch_init()) {
|
||||
printf("Wi-Fi init failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
printf("result from zig : %d\n", add(10, 31));
|
||||
sleep_ms(1000);
|
||||
}
|
||||
|
||||
// int rc = pico_led_init();
|
||||
// hard_assert(rc == PICO_OK);
|
||||
// while (true) {
|
||||
|
Loading…
Reference in New Issue
Block a user