Skip to content

Commit

Permalink
fixup! boards/esp32: Heltec WiFi LoRa 32 V2 board added
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Feb 20, 2020
1 parent ae16109 commit 18e8b6b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
1 change: 1 addition & 0 deletions boards/esp32-heltec-lora32-v2/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ FEATURES_PROVIDED += periph_dac
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += esp_rtc_timer_32k

FEATURES_PROVIDED += arduino
11 changes: 6 additions & 5 deletions boards/esp32-heltec-lora32-v2/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@
Heltec WiFi LoRa 32 V2 is an ESP32 development board with 8 MB Flash that uses
the EPS32 chip directly. It integrates

- a SemTech SX1276 or SX1278 for LoRaWAN communication and
- an OLED display connected via I2C.
- a SemTech SX1276 or SX1278 for LoRaWAN communication,
- an OLED display connected via I2C and
- an external 32.768 kHz crystal for RTC.

Since the board is
[open source hardware](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series),
a number of clones are available.

\htmlonly<style>div.image img[src="https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/raw/master/InstallGuide/win-screenshots/WIFI_LoRa_32.png"]{width:500px;}</style>\endhtmlonly
\image html "https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/raw/master/InstallGuide/win-screenshots/WIFI_LoRa_32.png" "Heltec WiFi Lora 32 V2"
\htmlonly<style>div.image img[src="https://heltec.org/wp-content/uploads/2019/07/SAM_0748_800X800.png"]{width:400px;}</style>\endhtmlonly
\image html "https://heltec.org/wp-content/uploads/2019/07/SAM_0748_800X800.png" "Heltec WiFi Lora 32 V2"

## <a name="hardware"> Hardware </a> &nbsp;&nbsp; [[TOC](#toc)]

Expand Down Expand Up @@ -92,7 +93,7 @@ overridden by \ref esp32_app_spec_conf "application-specific configurations".
\anchor esp32_heltec_lora_32_v2_table_board_configuration
Function | GPIOs | Remarks |Configuration
:---------------|:-------|:--------|:----------------------------------
BUTTON0 | GPIO0 | low active | |
BTN0 | GPIO0 | low active | |
LED0 | GPIO25 | high active | |
ADC | GPIO36, GPIO39, GPIO37, GPIO38, <br>GPIO0, GPIO2, GPIO12, GPIO13, <br>GPIO4, GPIO15 | | \ref esp32_adc_channels "ADC Channels"
DAC | | | \ref esp32_dac_channels "DAC Channels"
Expand Down
45 changes: 40 additions & 5 deletions boards/esp32-heltec-lora32-v2/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,34 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name Button pin definitions
* @{
*/
#define BUTTON0_PIN GPIO0

/**
* @brief Default button GPIO pin definition
*
* Generic ESP32 boards have a BOOT button connected to GPIO0, which can be
* used as button during normal operation. Since the GPIO0 pin is pulled up,
* the button signal is inverted, i.e., pressing the button will give a
* low signal.
*/
#define BTN0_PIN GPIO0

/**
* @brief Default button GPIO mode definition
*
* Since the GPIO of the button is pulled up with an external resistor, the
* mode for the GPIO pin has to be GPIO_IN.
*/
#define BTN0_MODE GPIO_IN

/**
* @brief Definition for compatibility with previous versions
*/
#define BUTTON0_PIN BTN0_PIN

/** @} */

/**
Expand Down Expand Up @@ -75,5 +94,21 @@
/* include common board definitions as last step */
#include "board_common.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Initialize the board specific hardware
*/
static inline void board_init(void) {
/* there is nothing special to initialize on this board */
board_init_common();
}

#ifdef __cplusplus
} /* end extern "C" */
#endif

#endif /* BOARD_H */
/** @} */

0 comments on commit 18e8b6b

Please sign in to comment.