MAX326xxFTHR LoRa PingPong
Dependencies: BufferedSerial SX1276GenericLib max32630fthr USBDeviceHT
main.cpp
- Committer:
- walterluu
- Date:
- 2021-12-29
- Revision:
- 21:933a9409c7a0
- Parent:
- 19:9f035b9e65ec
File content as of revision 21:933a9409c7a0:
/* * Copyright (c) 2018 HELIOS Software GmbH * 30826 Garbsen (Hannover) Germany * Licensed under the Apache License, Version 2.0); */ #include "main.h" #if defined(TARGET_MAX32630FTHR) // using the RFM95 board #include "max32630fthr.h" MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3); #endif DigitalOut myled(LED); // I2C i2c(P3_4, P3_5); // SDA, SCL // Hardware serial port over DAPLink Serial daplink(P2_1, P2_0); // Virtual serial port over USB // USBSerial microUSB; DigitalOut bLED(LED3); DigitalOut rLED(LED1); int main() { //#ifdef HELTEC_STM32L4 // DigitalOut vext(POWER_VEXT); // vext = POWER_VEXT_ON; //#endif //bLED = !bLED; // wait(5); // printf("Hello world! \n"); // wait(5); // daplink.printf("Hello world! \n"); // bLED = !bLED; /* * inits the Serial or USBSerial when available (230400 baud). * If the serial uart is not is not connected it swiches to USB Serial * blinking LED means USBSerial detected, waiting for a connect. * It waits up to 30 seconds for a USB terminal connections */ // InitSerial(30*1000, &myled); // rLED = !rLED; // dprintf("Welcome to the SX1276GenericLib"); printf("Welcome to the SX1276GenericLib"); wait(3); // dprintf("Starting a simple LoRa PingPong"); printf("Starting a simple LoRa PingPong"); wait(3); bLED = 1; // SX1276PingPong(); }