init can bus

This commit is contained in:
Travis Shears 2025-09-06 21:25:11 +02:00
parent 9c3f8e0b3f
commit 6adf5dca28
5 changed files with 180 additions and 0 deletions

View file

@ -18,6 +18,8 @@ project(test C CXX ASM)
pico_sdk_init()
# == NODE 1 ==
# the executable
add_executable( node1 node1.c bme280.c pms5003.c )
pico_set_program_version(node1 "0.1")
@ -29,6 +31,8 @@ target_link_libraries( node1 pico_stdlib hardware_i2c)
# create map/bin/hex file etc.
pico_add_extra_outputs( node1 )
# == WIFI SCAN ==
add_executable(wifi_scan wifi_scan.c)
target_include_directories(wifi_scan PRIVATE
${CMAKE_CURRENT_LIST_DIR}
@ -42,6 +46,7 @@ target_link_libraries(wifi_scan
pico_add_extra_outputs(wifi_scan)
# == MQTT TEST ==
# Define the host name of the MQTT server in an environment variable or pass it to cmake,
# e.g. cmake -DMQTT_SERVER=myserver ..
@ -94,3 +99,11 @@ target_compile_definitions(${TARGET_NAME} PRIVATE
)
pico_add_extra_outputs(${TARGET_NAME})
# == CAN BUS SENDER TEST ==
add_executable( can_bus_sender_test can_bus_sender_test.c can_bus.c )
pico_set_program_version(can_bus_sender_test "0.1")
pico_set_program_name(can_bus_sender_test "Can Bus Sender Test")
target_link_libraries(can_bus_sender_test pico_stdlib hardware_spi)
pico_add_extra_outputs(can_bus_sender_test)