Kubos Radio API

Enums

enum KRadioStatus

Radio function return values.

Values:

RADIO_OK = 0

Function call completed successfully.

RADIO_RX_EMPTY

Radio receive buffer is empty.

RADIO_ERROR

Generic radio error.

RADIO_ERROR_CONFIG

Function input parameter is invalid.

enum KRadioReset

Radio reset types.

Values:

RADIO_HARD_RESET

Perform hardware-level radio reset.

RADIO_SOFT_RESET

Perform software radio reset.

struct ax25_callsign
#include <radio-struct.h>

AX.25 call-sign structure.

Public Members

uint8_t ascii[6]

Six character station call-sign.

uint8_t ssid

One byte station SSID value.

Functions

KRadioStatus k_radio_init(void)

Initialize the radio interface.

Return
KRadioStatus RADIO_OK if OK, error otherwise

void k_radio_terminate(void)

Terminate the radio interface.

KRadioStatus k_radio_configure(radio_config *config)

Configure the radio.

Note
This function might not be implemented for all radios. See specific radio API documentation for configuration availability and structure
Return
KRadioStatus RADIO_OK if OK, error otherwise
Parameters
  • config: Pointer to the radio configuration structure

KRadioStatus k_radio_reset(KRadioReset type)

Reset the radio.

Note
This function might not be implemented for all radios
Return
KRadioStatus RADIO_OK if OK, error otherwise
Parameters
  • type: Type of reset to perform (hard, soft, etc)

KRadioStatus k_radio_send(char *buffer, int len, uint8_t *response)

Send a message to the radio’s transmit buffer.

Return
KRadioStatus RADIO_OK if OK, error otherwise
Parameters
  • buffer: Pointer to the message to send
  • len: Length of the message to send
  • response: Response value from radio (if supported)

KRadioStatus k_radio_recv(radio_rx_message *buffer, uint8_t *len)

Receive a message from the radio’s receive buffer.

Return
KRadioStatus RADIO_OK if a message was received successfully, RADIO_RX_EMPTY if there are no messages to receive, error otherwise
Parameters
  • buffer: Pointer where the message should be copied to
  • len: Length of the received message

KRadioStatus k_radio_get_telemetry(radio_telem *buffer, RadioTelemType type)

Read radio telemetry values.

Note
See specific radio API documentation for available telemetry types
Return
KRadioStatus RADIO_OK if OK, error otherwise
Parameters
  • buffer: Pointer to structure which data should be copied to
  • type: Telemetry packet to read