SingingCat 0
application
Typedefs | Enumerations | Functions
sx126x_hal.h File Reference

Hardware Abstraction Layer for SX126x. More...

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef enum sx126x_hal_status_e sx126x_hal_status_t
 

Enumerations

enum  sx126x_hal_status_e { SX126X_HAL_STATUS_OK = 0 , SX126X_HAL_STATUS_ERROR = 3 }
 

Functions

sx126x_hal_status_t sx126x_hal_read (struct network_context *nctx, const uint8_t *command, const uint16_t command_length, uint8_t *data, const uint16_t data_length)
 
sx126x_hal_status_t sx126x_hal_reset (struct network_context *nctx)
 
sx126x_hal_status_t sx126x_hal_wakeup (struct network_context *nctx)
 
sx126x_hal_status_t sx126x_hal_write (struct network_context *nctx, const uint8_t *command, const uint16_t command_length, const uint8_t *data, const uint16_t data_length)
 

Detailed Description

Hardware Abstraction Layer for SX126x.

Revised BSD License Copyright Semtech Corporation 2020. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file sx126x_hal.h.

Enumeration Type Documentation

◆ sx126x_hal_status_e

enum sx126x_hal_status_e

Definition at line 62 of file sx126x_hal.h.

Function Documentation

◆ sx126x_hal_read()

sx126x_hal_status_t sx126x_hal_read ( struct network_context nctx,
const uint8_t *  command,
const uint16_t  command_length,
uint8_t *  data,
const uint16_t  data_length 
)

Radio data transfer - read

Remarks
Shall be implemented by the user
Parameters
[in]contextRadio implementation parameters
[in]commandPointer to the buffer to be transmitted
[in]command_lengthBuffer size to be transmitted
[in]dataPointer to the buffer to be received
[in]data_lengthBuffer size to be received
Returns
Operation status

Definition at line 34 of file bus.c.

◆ sx126x_hal_reset()

sx126x_hal_status_t sx126x_hal_reset ( struct network_context nctx)

Reset the radio

Remarks
Shall be implemented by the user
Parameters
[in]contextRadio implementation parameters
Returns
Operation status

Definition at line 102 of file bus.c.

◆ sx126x_hal_wakeup()

sx126x_hal_status_t sx126x_hal_wakeup ( struct network_context nctx)

Wake the radio up.

Remarks
Shall be implemented by the user
Parameters
[in]contextRadio implementation parameters
Returns
Operation status

Definition at line 112 of file bus.c.

◆ sx126x_hal_write()

sx126x_hal_status_t sx126x_hal_write ( struct network_context nctx,
const uint8_t *  command,
const uint16_t  command_length,
const uint8_t *  data,
const uint16_t  data_length 
)

Radio data transfer - write

Remarks
Shall be implemented by the user
Parameters
[in]contextRadio implementation parameters
[in]commandPointer to the buffer to be transmitted
[in]command_lengthBuffer size to be transmitted
[in]dataPointer to the buffer to be transmitted
[in]data_lengthBuffer size to be transmitted
Returns
Operation status

Definition at line 64 of file bus.c.