Skip to content

Commit 6207eed

Browse files
committed
core: update logicrom SDK files
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 1b7a4a1 commit 6207eed

File tree

20 files changed

+167
-116
lines changed

20 files changed

+167
-116
lines changed

cores/logicrom/logicromsdk/include/fota.h

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
extern "C" {
1111
#endif
1212

13+
/**
14+
* Add fota command to CLI
15+
*
16+
* Usage:
17+
* fota=[url]
18+
*
19+
* @return returns 0
20+
*/
21+
int fota_init(void);
22+
1323
/**
1424
* Start Firmware Update
1525
* @param in_url [in] HTTP URL to download firmware
@@ -25,7 +35,19 @@ int fota_in_progress(void);
2535

2636
/**
2737
* @brief Register with Logicrom FOTA server for automatic firmware
28-
* updates via Device management console.
38+
* updates via Device management console. Automatic firmware update
39+
* is checked once a day on server.
40+
*
41+
* This function also add additional options in "fota" command
42+
*
43+
* To check update on server\n
44+
* fota=check
45+
*
46+
* To force download firmware\n
47+
* fota=download
48+
*
49+
* To manually update firmware\n
50+
* fota=update
2951
*
3052
* @param code Firmware code to identify application
3153
* @param ver current firmware version

cores/logicrom/logicromsdk/include/gpslib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ time_t gpsmktime(char *date_in, char *time_in);
230230
* False (0) if point is outside geofence
231231
* -22 if parameters are invalid.
232232
*/
233-
int geofence_check(int type, struct point_t *fence, unsigned int corners_radius, struct point_t *point);
233+
int geofence_check(int type, const struct point_t *fence, unsigned int corners_radius, const struct point_t *point);
234234

235235
#ifdef __cplusplus
236236
}

cores/logicrom/logicromsdk/include/hw/gpio.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ enum gpio_trigger_e {
5959
* Request a GPIO
6060
* @param ioname name of GPIO from @ref gpioname_e
6161
* @param flags ORed list of gpio initialization flags @ref gpio_conf_e
62-
* @return On success returns handle which can be used with other gpio APIs
63-
* on failure negative error code is returned
62+
* @return On success returns gpio handle, on failure (when no memory/already used) 0 is returned
6463
*/
6564
int gpio_request(unsigned int ioname, int flags);
6665

@@ -106,7 +105,7 @@ int gpio_setdir(int handle, int dir);
106105
*
107106
* @param handle Handle to gpio object returned by @ref gpio_request
108107
* @param fn Callback function of type @ref gpio_callback_f
109-
* @param trigger_time Debounce time or trigger delay
108+
* @param trigger_time Debounce time or trigger delay in milliseconds
110109
* @param flags Type of trigger requested @ref gpio_trigger_e
111110
* @return 0 on success, negative error code on failure
112111
*/

cores/logicrom/logicromsdk/include/hw/sdmmc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ enum cardtype_e {
3030
*
3131
* On success, SD card is mounted on VFS at path: "/sd"
3232
*
33+
* @note Only supported on 4G Modules
34+
*
3335
* @param type card type @ref cardtype_e
3436
* @return 0 on success, negative on error
3537
*/
@@ -38,6 +40,8 @@ int sdmmc_mount(uint8_t type);
3840
/**
3941
* @brief Unmount SD card
4042
*
43+
* @note Only supported on 4G Modules
44+
*
4145
* @return 0 on success, negative on error
4246
*/
4347
int sdmmc_unmount(void);

cores/logicrom/logicromsdk/include/hw/spi.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,24 @@ int spi_hw_free(int port);
121121
int spi_hw_cscontrol(int port, int level);
122122
#endif
123123

124+
/**
125+
* @brief Acquire SPI hardware access lock.
126+
*
127+
* This is only a provisional lock for resource access.
128+
*
129+
* @param port [in] SPI Port Number (@ref spiport_e)
130+
* @return 0 on success, negative value on error
131+
*/
132+
int spi_hw_lock(int port);
133+
134+
/**
135+
* @brief Release SPI hardware access lock
136+
*
137+
* @param port [in] SPI Port Number (@ref spiport_e)
138+
* @return 0 on success, negative value on error
139+
*/
140+
int spi_hw_unlock(int port);
141+
124142
#ifdef __cplusplus
125143
}
126144
#endif

cores/logicrom/logicromsdk/include/plat/def_adc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum adcch_e
1313
ADC_CH3, /**< ADC channel 3 - Pin 2 */
1414
ADC_CH4, /**< ADC channel 4 - Pin 13 */
1515
ADC_CH5, /**< ADC channel 5 - Pin 33 */
16-
#elif defined(PLATFORM_S20U)
16+
#elif defined(PLATFORM_MC20U)
1717
ADC_CH0, /**< ADC channel 0 - Pin 6 */
1818
ADC_CH1, /**< ADC channel 1 - Pin 47 */
1919
ADC_CH2, /**< ADC channel 2 - Pin 66 */

cores/logicrom/logicromsdk/include/plat/def_gpio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ enum gpioname_e
6060
GPIO_49, /**< Pin 81 */
6161
GPIO_50, /**< Pin 82 */
6262
GPIO_51, /**< Pin 31 */
63-
#elif defined(PLATFORM_S20U)
63+
#elif defined(PLATFORM_MC20U)
6464
GPIO_0, /**< Pin 47 */
6565
GPIO_1, /**< Pin 37 */
6666
GPIO_2, /**< Pin 35 */

cores/logicrom/logicromsdk/include/plat/def_i2c.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
enum i2cport_e {
88
/**
9-
* @brief I2C Port 0
9+
* I2C Port 0
1010
*
1111
* <!--
1212
* **4G LTE Modems**
@@ -20,20 +20,20 @@ enum i2cport_e {
2020
* +---------+-----------+-----------+----------+----------+----------+----------+
2121
*
2222
* **2G/NB-IoT Modems**
23-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
24-
* | I2C Pin | MC20U Pin | M56 Pin | MC60 Pin | M66 Pin | BC20 Pin | SIM868 |
25-
* | | S20U Pin | | MC20 Pin | | | Pin |
26-
* +=========+==================+===========+=================+===========+============+============+
27-
* | SCL | Pin 35 | Pin 24 | Pin 35 | Pin 20 | Pin 58 | Pin 65 |
28-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
29-
* | SDA | Pin 36 | Pin 23 | Pin 36 | Pin 21 | Pin 63 | Pin 64 |
30-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
23+
* +---------+-----------+-----------------+-----------+------------+------------+
24+
* | I2C Pin | M56 Pin | MC60 Pin | M66 Pin | BC20 Pin | SIM868 |
25+
* | | | MC20(U) Pin | | | Pin |
26+
* +=========+===========+=================+===========+============+============+
27+
* | SCL | Pin 24 | Pin 35 | Pin 20 | Pin 58 | Pin 65 |
28+
* +---------+-----------+-----------------+-----------+------------+------------+
29+
* | SDA | Pin 23 | Pin 36 | Pin 21 | Pin 63 | Pin 64 |
30+
* +---------+-----------+-----------------+-----------+------------+------------+
3131
* -->
3232
*/
3333
I2C_PORT_0,
3434
#if defined(SOC_RDA8910) || defined(_DOXYGEN_)
3535
/**
36-
* @brief I2C Port 1
36+
* I2C Port 1
3737
*
3838
* @note Avaiable on 4G modems only
3939
*

cores/logicrom/logicromsdk/include/plat/def_pwm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#if defined(SOC_RDA8910) || defined(_DOXYGEN_)
55
/**
66
* PWM Channel 1 - Fixed Period in milliseconds
7-
* @note: Only for Platform with RDA8910 SoC
7+
* @note Only for Platform with RDA8910 SoC
88
*/
99
enum pwm1_prd_e {
1010
PWM1_PRD_125MS,
@@ -19,7 +19,7 @@ enum pwm1_prd_e {
1919

2020
/**
2121
* PWM Channel 1 - Fixed On-time/Duty cycle in milliseconds
22-
* @note: Only for Platform with RDA8910 SoC
22+
* @note Only for Platform with RDA8910 SoC
2323
*/
2424
enum pwm1_duty_e {
2525
PWM1_DUTY_UNDEFINE,

cores/logicrom/logicromsdk/include/plat/def_spi.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
enum spiport_e {
88
/**
9-
* @brief SPI Port 0
9+
* SPI Port 0
1010
*
1111
* <!--
1212
* ** 4G Modems **
@@ -23,18 +23,18 @@ enum spiport_e {
2323
* +---------+-----------+-----------+----------+----------+----------+----------+
2424
*
2525
* ** 2G/NB-IoT Modems **
26-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
27-
* | SPI Pin | MC20U Pin | M56 Pin | MC60 Pin | M66 Pin | BC20 Pin | SIM868 |
28-
* | | |br| S20U Pin | | |br| MC20 Pin | | | Pin |
29-
* +=========+==================+===========+=================+===========+============+============+
30-
* | MISO | Pin 61 | Pin 15 | Pin 61 | Pin 31 | Pin 61 | Pin 41 |
31-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
32-
* | MOSI | Pin 60 | Pin 16 | Pin 60 | Pin 33 | Pin 60 | Pin 42 |
33-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
34-
* | CLK | Pin 62 | Pin 18 | Pin 62 | Pin 32 | Pin 62 | Pin 7 |
35-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
36-
* | CS | Pin 59 | Pin 4 | Pin 59 | Pin 30 | Pin 59 | Pin 5 |
37-
* +---------+------------------+-----------+-----------------+-----------+------------+------------+
26+
* +---------+-----------+-------------------+-----------+------------+------------+
27+
* | SPI Pin | M56 Pin | MC60 Pin | M66 Pin | BC20 Pin | SIM868 |
28+
* | | | |br| MC20(U) Pin | | | Pin |
29+
* +=========+===========+===================+===========+============+============+
30+
* | MISO | Pin 15 | Pin 61 | Pin 31 | Pin 61 | Pin 41 |
31+
* +---------+-----------+-------------------+-----------+------------+------------+
32+
* | MOSI | Pin 16 | Pin 60 | Pin 33 | Pin 60 | Pin 42 |
33+
* +---------+-----------+-------------------+-----------+------------+------------+
34+
* | CLK | Pin 18 | Pin 62 | Pin 32 | Pin 62 | Pin 7 |
35+
* +---------+-----------+-------------------+-----------+------------+------------+
36+
* | CS | Pin 4 | Pin 59 | Pin 30 | Pin 59 | Pin 5 |
37+
* +---------+-----------+-------------------+-----------+------------+------------+
3838
* -->
3939
*
4040
*/

0 commit comments

Comments
 (0)