ether2ser 0.1.0
Ethernet <-> synchronous V.24 bridge firmware for RP2040 + W5500
Loading...
Searching...
No Matches
examples/blink/main.c
Go to the documentation of this file.
1/*
2 * ether2ser — Ethernet ↔ synchronous V.24 (RS-232/V.28) bridge
3 *
4 * File: src/examples/blink/main.c
5 * Purpose: Example entry point blinking the USER LED via PIO and APU.
6 *
7 * Notes:
8 * - Demonstrates concurrent PIO-driven and CPU-driven GPIO blinking.
9 * - Targets the W55RP20-EVB-PICO (USER LED on GPIO19).
10 *
11 * SPDX-License-Identifier: Apache-2.0
12 *
13 * Copyright (c) 2026 Florian <f.leuze@outlook.de>
14 */
15
16// Related headers
17#include "blink.h"
18
19// Standard library headers
20#include <stdio.h>
21
22// Project Headers
23#include "hardware/pio.h"
24#include "pico/stdio.h"
25#include "pico/time.h"
26
27// Generated headers
28
29#define APU_LED_PIN 25
30
31// W55RP20-EVB-PICO onboard USER LED is on GPIO19.
32#define PIO_LED_PIN 19
33
34int main(void)
35{
36 stdio_init_all();
37
38 // Give the USB CDC a moment to enumerate (harmless even if not using USB)
39 sleep_ms(1500);
40
41 printf("v24-eth-bridge: hello from RP2040\r\n");
42 printf("PIO blinking GPIO19 (USER LED), APU blinking GPIO%d\r\n", APU_LED_PIN);
43
44 // --- Start PIO blink on onboard USER LED (GPIO19) ---
46
47 // --- Keep your existing APU blink code unchanged ---
49}