BSP API

Board specific implementation of the board support package (BSP).

Myriota development board BSP is used by default.

Board-specific environment

#defineBOARD_ENV_LEN_MAX50

Get board-specific environment variables Returns string which contains semicolon separated variables.

  • GNSSFIX

    • 0: skip system GNSS fix

    • unset: do system GNSS fix

  • DUMPTX

    • 1: dump transmission information

    • 0 or unset: don't dump

char *BoardEnvGet(void)

Board initialisation

intBoardInit(void)

Initialise the board before any system hardware initialisation, invoked only once at startup.

Returns 0 if succeeded and -1 if failed.

intBoardStart(void)

Initialise the board after the system hardware initialisation, invoked only once at startup.

Can be overriden by your application code individually. Returns 0 if succeeded and -1 if failed.

Battery voltage reading

intBoardBatteryVoltGet(uint32_t * mv)

Get the battery voltage in millivolt.

Returns 0 if succeeded and -1 if failed. If battery measurement is not supported then both voltage and the return value should be 0.

LED control

voidBoardLEDInit(void)

Control the LED for system status indication.

voidBoardLEDDeinit(void)

voidBoardLEDTurnOn(void)

voidBoardLEDTurnOff(void)

voidBoardLEDToggle(void)

GNSS module power control

voidBoardGNSSPowerEnable(void)

voidBoardGNSSPowerDisable(void)

boolBoardGNSSPowerIsEnabled(void)

Returns true if enabled and false if disabled.

Satellite radio antenna control

enumRadioBand

ValuesDescriptions
RADIO_BAND_VHF
RADIO_BAND_UHF
RADIO_BAND_ISM

Select the antenna based on satellite radio mode and frequency band.

intBoardAntennaSelect(bool IsTx,RadioBandBand)

Returns 0 if succeeded and -1 if failed.

Debug output

void *BoardDebugInit(void)

voidBoardDebugDeinit(void)

intBoardDebugWrite(const uint8_t * Tx,size_t Length)

Returns 0 if all bytes are sent and -1 if not.