PicoWAN SDK Documentation
system.h
Go to the documentation of this file.
1 
31 #ifndef _SYSTEM_H_
32 #define _SYSTEM_H_
33 
34 #include <stdint.h>
35 #include <arch.h>
36 #include "gpio.h"
37 
38 #define PIN_END 255
39 
40 typedef struct io_pin {
41  gpio_port_t port;
42  uint8_t pin;
43  gpio_pupd_t pupd;
44 } io_pin_t;
45 
46 typedef enum rf_path {
47  PATH_RX,
48  PATH_TX_RFO,
49  PATH_TX_PA,
50  PATH_NONE,
51 } rf_path_t;
52 
53 
62 void system_set_dcdc_high_power(uint8_t en);
63 
69 void system_enable_sx_power(uint8_t en);
70 
76 void system_enable_sx_clock(uint8_t en);
77 
85 void system_try_select_rf_path(rf_path_t path);
86 
92 void system_set_sx_nss(uint8_t state);
93 
99 void system_set_sx_rst(uint8_t state);
100 
104 void system_disable_irqs(void);
105 
109 void system_enable_irqs(void);
110 
119 
125 void system_sleep(void);
126 
132 void system_sleep_low_power(void);
133 
137 void system_reboot(void);
138 
144 void system_init(void);
145 
146 #endif /* _SYSTEM_H_ */
void system_try_select_rf_path(rf_path_t path)
Selects the requested RF path.
Definition: system.c:217
void system_disable_irqs(void)
Disables all IRQs.
Definition: system.c:378
GPIO driver.
void system_sleep_low_power(void)
Enters low-power sleep mode.
Definition: system.c:567
void system_sleep(void)
Enters sleep mode.
Definition: system.c:560
void system_set_dcdc_high_power(uint8_t en)
Switches the DC-DC converter to high-power mode.
Definition: system.c:141
Definition: system.h:40
void system_set_sx_nss(uint8_t state)
Sets to HIGH or LOW the radio nSS (inverted slave select) pin (for SPI communication).
Definition: system.c:285
void system_enable_sx_power(uint8_t en)
Powers up/down the radio IC.
Definition: system.c:179
void system_register_lowpower_pins(io_pin_t *pins)
Registers additional pins whose configuration and state must be kept when the board/device is in low-...
Definition: system.c:391
void system_init(void)
Initializes the system (IOs, clocks, ...).
Definition: system.c:691
void system_set_sx_rst(uint8_t state)
Sets to HIGH, LOW, or floating the radio reset pin (for SPI communication).
Definition: system.c:291
void system_enable_irqs(void)
Enables all IRQs.
Definition: system.c:384
void system_reboot(void)
Reboots the system.
Definition: system.c:686
void system_enable_sx_clock(uint8_t en)
Enables/disables the radio IC&#39;s clock.
Definition: system.c:192