Skip to content

Commit e12ff33

Browse files
committed
First commit, trial version 0.1
0 parents  commit e12ff33

File tree

6 files changed

+1121
-0
lines changed

6 files changed

+1121
-0
lines changed

components/lora/Kconfig

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
menu "LoRa Configuration"
2+
3+
config CS_GPIO
4+
int "CS GPIO"
5+
range 0 35
6+
default 15
7+
help
8+
Pin Number where the NCS pin of the LoRa module is connected to.
9+
10+
config RST_GPIO
11+
int "RST GPIO"
12+
range 0 35
13+
default 32
14+
help
15+
Pin Number where the NRST pin of the LoRa module is connected to.
16+
17+
config MISO_GPIO
18+
int "MISO GPIO"
19+
range 0 35
20+
default 13
21+
help
22+
Pin Number to be used as the MISO SPI signal.
23+
24+
config MOSI_GPIO
25+
int "MOSI GPIO"
26+
range 0 35
27+
default 12
28+
help
29+
Pin Number to be used as the MOSI SPI signal.
30+
31+
config SCK_GPIO
32+
int "SCK GPIO"
33+
range 0 35
34+
default 14
35+
help
36+
Pin Number to be used as the SCK SPI signal.
37+
38+
endmenu

components/lora/component.mk

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# "main" pseudo-component makefile.
3+
#
4+
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
5+

components/lora/include/lora.h

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
#ifndef __LORA_H__
3+
#define __LORA_H__
4+
5+
void lora_reset(void);
6+
void lora_explicit_header_mode(void);
7+
void lora_implicit_header_mode(int size);
8+
void lora_idle(void);
9+
void lora_sleep(void);
10+
void lora_receive(void);
11+
void lora_set_tx_power(int level);
12+
void lora_set_frequency(long frequency);
13+
void lora_set_spreading_factor(int sf);
14+
void lora_set_bandwidth(long sbw);
15+
void lora_set_coding_rate(int denominator);
16+
void lora_set_preamble_length(long length);
17+
void lora_set_sync_word(int sw);
18+
void lora_enable_crc(void);
19+
void lora_disable_crc(void);
20+
int lora_init(void);
21+
void lora_send_packet(uint8_t *buf, int size);
22+
int lora_receive_packet(uint8_t *buf, int size);
23+
int lora_received(void);
24+
int lora_packet_rssi(void);
25+
float lora_packet_snr(void);
26+
void lora_close(void);
27+
int lora_initialized(void);
28+
void lora_dump_registers(void);
29+
30+
#endif

0 commit comments

Comments
 (0)