mirror of
https://github.com/manuelbl/ttn-esp32.git
synced 2024-09-28 04:53:59 +02:00
use weak references for HAL functions that control low-speed pins - allows override with own symbols
This commit is contained in:
parent
877784640d
commit
4e0587bb8e
@ -152,6 +152,7 @@ void init_io(void)
|
||||
ESP_LOGI(TAG, "IO initialized");
|
||||
}
|
||||
|
||||
__attribute__((weak)) // duplicate this symbol if your pin is controlled by e.g. I2C
|
||||
void hal_pin_rxtx(u1_t val)
|
||||
{
|
||||
if (pin_rx_tx == LMIC_UNUSED_PIN)
|
||||
@ -160,6 +161,7 @@ void hal_pin_rxtx(u1_t val)
|
||||
gpio_set_level(pin_rx_tx, val);
|
||||
}
|
||||
|
||||
__attribute__((weak)) // duplicate this symbol if your pin is controlled by e.g. I2C
|
||||
void hal_pin_rst(u1_t val)
|
||||
{
|
||||
if (pin_rst == LMIC_UNUSED_PIN)
|
||||
@ -252,6 +254,7 @@ void hal_spi_read(u1_t cmd, u1_t *buf, size_t len)
|
||||
ESP_ERROR_CHECK(err);
|
||||
}
|
||||
|
||||
|
||||
void IRAM_ATTR assert_nss(spi_transaction_t* trans)
|
||||
{
|
||||
gpio_set_level(pin_nss, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user