Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Arduino.h>
- #include <STM32Ethernet.h>
- void setup() {
- Serial.begin(115200); // UART через ST-Link для логов
- while (!Serial);
- Serial.println("Starting Ethernet over USB RNDIS...");
- Ethernet.begin();
- while (!Ethernet.linkStatus()) {
- Serial.println("Waiting for Ethernet link...");
- delay(500);
- }
- Serial.print("IP address: ");
- Serial.println(Ethernet.localIP());
- }
- void loop() {
- static uint32_t timer = 0;
- if (millis() - timer > 1000) {
- Serial.println("RNDIS running...");
- timer = millis();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment