Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
rufort
/
IAS0360_lab_excercises_2024
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f201295f
authored
Sep 13, 2024
by
ishikawatatsuki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding cyw43_arch for pico W
parent
bcb56041
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
lab_0/mcu/CMakeLists.txt
lab_0/mcu/main.cpp
lab_0/pc/Makefile
lab_0/mcu/CMakeLists.txt
View file @
f201295f
...
...
@@ -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
)
lab_0/mcu/main.cpp
View file @
f201295f
...
...
@@ -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
"
);
...
...
lab_0/pc/Makefile
View file @
f201295f
BIN
=
lab0
CC
=
g++
SRC
=
lab0.cpp AnyLib.cpp
SRC
=
lab0.cpp AnyLib.cpp
../../lib/src/NeuralNetwork.cpp
all
:
$(BIN)
$(BIN)
:
$(SRC)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment