1
0
mirror of https://github.com/peterantypas/maiana.git synced 2025-05-21 09:50:08 -07:00

Board 10.9 bringup

This commit is contained in:
Peter Antypas 2021-06-27 08:03:58 -07:00
parent 0a23953920
commit 04799fc2de
5 changed files with 13 additions and 14 deletions

View File

@ -32,7 +32,7 @@ public:
private: private:
LEDManager(); LEDManager();
bool mForceTXLedOff = false; volatile bool mForceTXLedOff = false;
}; };

View File

@ -39,7 +39,6 @@ void tickCB()
void LEDManager::init() void LEDManager::init()
{ {
bsp_set_tick_callback(tickCB);
if ( !Configuration::instance().isStationDataProvisioned() ) if ( !Configuration::instance().isStationDataProvisioned() )
{ {
mForceTXLedOff = true; mForceTXLedOff = true;
@ -47,6 +46,7 @@ void LEDManager::init()
// This call actually has the opposite effect as it will cause the TX led to be pulled to GND // This call actually has the opposite effect as it will cause the TX led to be pulled to GND
bsp_tx_led_on(); bsp_tx_led_on();
} }
bsp_set_tick_callback(tickCB);
} }
void LEDManager::onTick() void LEDManager::onTick()
@ -64,7 +64,6 @@ void LEDManager::onTick()
count2 = 1; count2 = 1;
bsp_tx_led_off(); bsp_tx_led_off();
} }
} }

View File

@ -49,6 +49,8 @@ void NoiseFloorDetector::report(char channel, uint8_t rssi)
{ {
#if BOARD_REV == 61 or BOARD_REV == 52 #if BOARD_REV == 61 or BOARD_REV == 52
if ( rssi < 0x12 ) // Not realistic, likely a bug if ( rssi < 0x12 ) // Not realistic, likely a bug
#elif BOARD_REV == 109
if ( rssi < 0x24 )
#else #else
if ( rssi < 0x32 ) // Not realistic, likely a bug if ( rssi < 0x32 ) // Not realistic, likely a bug
#endif #endif

View File

@ -501,7 +501,7 @@ uint8_t bsp_tx_spi_byte(uint8_t data)
HAL_SPI_TransmitReceive(&hspi1, &data, &result, 1, 2); HAL_SPI_TransmitReceive(&hspi1, &data, &result, 1, 2);
return result; return result;
} }
#if 0
bool bsp_erase_station_data() bool bsp_erase_station_data()
{ {
return false; return false;
@ -511,16 +511,20 @@ bool bsp_save_station_data(const StationData &data)
{ {
return false; return false;
} }
#endif
void bsp_reboot() void bsp_reboot()
{ {
NVIC_SystemReset(); NVIC_SystemReset();
} }
#if 0
bool bsp_read_station_data(StationData &data) bool bsp_read_station_data(StationData &data)
{ {
return false; return false;
} }
#endif
bool bsp_is_tx_disabled() bool bsp_is_tx_disabled()
{ {
@ -545,10 +549,12 @@ void bsp_signal_rx_event()
HAL_GPIO_WritePin(RX_EVT_PORT, RX_EVT_PIN, GPIO_PIN_SET); HAL_GPIO_WritePin(RX_EVT_PORT, RX_EVT_PIN, GPIO_PIN_SET);
} }
#if 0
void bsp_signal_tx_event() void bsp_signal_tx_event()
{ {
HAL_GPIO_WritePin(TX_EVT_PORT, TX_EVT_PIN, GPIO_PIN_SET); HAL_GPIO_WritePin(TX_EVT_PORT, TX_EVT_PIN, GPIO_PIN_SET);
} }
#endif
void bsp_signal_gps_status(bool tracking) void bsp_signal_gps_status(bool tracking)
{ {
@ -626,13 +632,8 @@ extern "C"
void HAL_SYSTICK_Callback() void HAL_SYSTICK_Callback()
{ {
static int count = 1; if ( tickCallback )
if ( count++ % 20 == 0 ) tickCallback();
{
count = 1;
HAL_GPIO_WritePin(RX_EVT_PORT, RX_EVT_PIN, GPIO_PIN_RESET);
HAL_GPIO_WritePin(TX_EVT_PORT, TX_EVT_PIN, GPIO_PIN_RESET);
}
} }
} }

View File

@ -17,7 +17,6 @@
along with this program. If not, see <https://www.gnu.org/licenses/> along with this program. If not, see <https://www.gnu.org/licenses/>
*/ */
#include "stm32l4xx_hal.h"
#include "config.h" #include "config.h"
#include "RadioManager.hpp" #include "RadioManager.hpp"
#include "RXPacketProcessor.hpp" #include "RXPacketProcessor.hpp"
@ -25,10 +24,8 @@
#include "TXScheduler.hpp" #include "TXScheduler.hpp"
#include "GPS.hpp" #include "GPS.hpp"
#include "LEDManager.hpp" #include "LEDManager.hpp"
#include "SystickTimer.hpp"
#include "CommandProcessor.hpp" #include "CommandProcessor.hpp"
#include "bsp.hpp" #include "bsp.hpp"
#include "printf_serial.h"
void jump_to_bootloader() void jump_to_bootloader()