Commit f201295f by ishikawatatsuki

Adding cyw43_arch for pico W

parent bcb56041
......@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.13)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(PICO_BOARD pico_w)
# initalize pico_sdk from installed location
# (note this can come from environment, CMake cache etc)
......@@ -31,7 +32,7 @@ pico_enable_stdio_uart(main 1)
pico_enable_stdio_usb(main 1)
# Add the standard library to the build
target_link_libraries(main pico_stdlib)
target_link_libraries(main pico_stdlib pico_cyw43_arch_none)
pico_add_extra_outputs(main)
......@@ -2,10 +2,9 @@
#include <iostream>
#include <vector>
#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
#include "includes/AnyLib.h"
const uint LED_PIN = 25;
void task1()
{
MathBasics mb;
......@@ -17,12 +16,15 @@ void task1()
int main()
{
stdio_init_all();
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN,GPIO_OUT);
// Initialize the system and Wi-Fi chip (which includes the onboard LED control)
if (cyw43_arch_init()) {
// Failed to initialize
return -1;
}
bool value =0;
while (true)
{
gpio_put(LED_PIN,value);
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, value);
sleep_ms(500);
value =!value;
printf("LED toggle\n");
......
BIN = lab0
CC = g++
SRC = lab0.cpp AnyLib.cpp
SRC = lab0.cpp AnyLib.cpp ../../lib/src/NeuralNetwork.cpp
all: $(BIN)
$(BIN): $(SRC)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment