MACRAW IP stack with ARP/ICMP, stable device ordering, LED blink on test
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
#include <unordered_map>
|
||||
#include "pico/stdlib.h"
|
||||
#include "pico/time.h"
|
||||
#include "hardware/gpio.h"
|
||||
#include "dispatch.h"
|
||||
#include "handlers.h"
|
||||
#include "w6300.h"
|
||||
|
||||
static constexpr uint8_t LED_PIN = 25;
|
||||
|
||||
static void led_toggle() {
|
||||
gpio_xor_mask(1 << LED_PIN);
|
||||
dispatch_schedule_ms(1000, led_toggle);
|
||||
}
|
||||
|
||||
std::string_view firmware_name = "picomap_test";
|
||||
|
||||
static constexpr uint16_t PICOMAP_DISCOVERY_PORT = 28777;
|
||||
@@ -114,8 +123,9 @@ static constexpr handler_entry handlers[] = {
|
||||
int main() {
|
||||
dispatch_init();
|
||||
|
||||
w6300::open_socket(test_socket, w6300::protocol::udp, w6300::port_num{0}, w6300::sock_flag::dha_manual);
|
||||
w6300::set_socket_io_mode(test_socket, w6300::sock_io_mode::nonblock);
|
||||
gpio_init(LED_PIN);
|
||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||
dispatch_schedule_ms(1000, led_toggle);
|
||||
|
||||
dispatch_run(handlers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user