30#ifndef PROTOCORE_LORA_H
31#define PROTOCORE_LORA_H
57bool pc_lora_frame_parse(
const uint8_t *raw, uint16_t len, pc_lora_header *hdr,
const uint8_t **payload,
58 uint16_t *payload_len);
64uint16_t pc_lora_frame_build(
const pc_lora_header *hdr,
const uint8_t *payload, uint16_t len, uint8_t *out,
70using pc_lora_reg_read_fn = uint8_t (*)(uint8_t reg,
void *ctx);
72using pc_lora_reg_write_fn = void (*)(uint8_t reg, uint8_t val,
void *ctx);
77 pc_lora_reg_read_fn read;
78 pc_lora_reg_write_fn write;
98bool pc_lora_init(
const pc_lora_bus *bus,
const pc_lora_config *cfg);
105bool pc_lora_send(
const pc_lora_bus *bus,
const uint8_t *frame, uint8_t len);
108bool pc_lora_tx_done(
const pc_lora_bus *bus);
111void pc_lora_set_rx(
const pc_lora_bus *bus);
118int pc_lora_recv(
const pc_lora_bus *bus, uint8_t *buf, uint8_t cap, int16_t *rssi);
User-facing configuration for ProtoCore.