ESP32-PaxCounter/src/hal/lopy.h

38 lines
1.5 KiB
C
Raw Normal View History

2018-11-25 16:35:36 +01:00
// clang-format off
#ifndef _LOPY_H
#define _LOPY_H
#include <stdint.h>
2018-07-15 23:08:52 +02:00
// Hardware related definitions for Pycom LoPy Board (NOT LoPy4)
2018-03-18 19:45:17 +01:00
2018-08-11 19:12:04 +02:00
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
2018-03-18 19:45:17 +01:00
#define CFG_sx1272_radio 1
2018-09-29 19:26:24 +02:00
#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED
#define HAS_RGB_LED (0) // WS2812B RGB LED on GPIO0
2018-03-18 19:45:17 +01:00
2018-11-25 11:48:03 +01:00
// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
2018-12-22 18:01:45 +01:00
#define LORA_IRQ (23)
2018-03-18 19:45:17 +01:00
// select WIFI antenna (internal = onboard / external = u.fl socket)
#define HAS_ANTENNA_SWITCH (16) // pin for switching wifi antenna
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
2018-06-24 11:17:55 +02:00
2018-09-29 19:26:24 +02:00
// uncomment this only if your LoPy runs on a PYTRACK BOARD
#define HAS_GPS 1
#define GPS_I2C GPIO_NUM_25, GPIO_NUM_26 // SDA (P22), SCL (P21)
#define GPS_ADDR 0x10
2018-06-24 11:17:55 +02:00
2018-09-29 19:26:24 +02:00
// uncomment this only if your LoPy runs on a EXPANSION BOARD
//#define HAS_LED (12) // use if LoPy is on Expansion Board, this has a user LED
2018-09-29 19:26:24 +02:00
//#define LED_ACTIVE_LOW 1 // use if LoPy is on Expansion Board, this has a user LED
//#define HAS_BUTTON (13) // user button on expansion board
2018-09-30 17:50:45 +02:00
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
2018-06-24 11:17:55 +02:00
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
2018-09-29 19:26:24 +02:00
//#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm -> expansion board 3.0
//#define BATT_FACTOR 4 // voltage divider 115kOhm/56kOhm -> expansion board 2.0
#endif