-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f438d4
commit 591867a
Showing
100 changed files
with
14,772 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@ECHO OFF | ||
IF "%1" == "" ( | ||
ECHO More parameter is required. | ||
ECHO - "make clean" may clean the compiling, and "make new" may start to compile. | ||
) ELSE ( | ||
CALL make\gcc\gcc_make.bat %1 | ||
) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
OpenCPU_NB1_SDK_V1.5 | ||
Sep 5 2019 | ||
1.Update the dfota user guide. | ||
2.Add the example and RIL APIs of MQTT. | ||
3.Add interface that control UART send data to 485 device. | ||
4.Modify the return value of the interface function that checks the status of the SIM card. | ||
5.Delete the URC of receive data in TCP/UDP,change to callback mode to print received data. | ||
6.Delete the URC of receive data in LwM2M,change to callback mode to print received data. | ||
7.Delete the URC of receive data in MQTT ,change to callback mode to print received data. | ||
8.Delete the URC of receive data in Onenet,change to callback mode to print received data. | ||
9.Add an event interface that supports called by hardware interrupt. | ||
|
||
OpenCPU_NB1_SDK_V1.4 | ||
May 5 2019 | ||
1.Added the GPIO pins (GPIO0, USB_MODE, GPIO6~GPIO8). | ||
2.Added timer API for microsecond counting. | ||
3.Added Ql_Timer_Delete API to delete current timer ID. | ||
4.Added Ql_Delay_us API to microsecond delay. | ||
5.Added Ql_UART_GetOption API to query UART parameters. | ||
6.Added Ql_OS_GetCurrenTaskLeftStackSize API for querying remaining stack size for dedicated task. | ||
7.Added Ql_UART_GetOption API to query UART parameters. | ||
8.Added Ql_ADC_Read API to single read ADC values. | ||
9.Fixed the bug that UART will be stuck when receive 1400 more bytes in one time. | ||
10.Fixed the bug that the time reading result is wrong when set a time-zone not equal to 32 using Ql_SetLocalTime API. | ||
11.Update the return value of event and mutex interfaces. | ||
12.Update Functional Documents and AT Documents. | ||
13.Added Ql_OS_GetTaskTickCount and Ql_OS_GetTaskTickCountFromISR API to count of ticks. | ||
|
||
OpenCPU_NB1_SDK_V1.3 | ||
March 10 2019 | ||
1.Update Functional Documents and AT Documents. | ||
2.Unrestricted the time interval limitation of ADC sampling. The minimum time interval can be configured as 10ms. | ||
3.Modified the implementation of Ql_OS_GetMessage for dedicated scenarios – ADC/Normal EINT/Normal TIMER. This function will | ||
not return after the callback is called. It will go to the message receive code again internally to fetch the next message. | ||
4.Fixed the bug that some GPIOs will hop during power on phase. | ||
5.Update the RTC、LWM2M and onenet example. | ||
6.Fixed the bug that json data cannot be receive in onenet. | ||
7.Supported upgrade APP bin file via DFOTA. | ||
|
||
OpenCPU_NB1_SDK_V1.2 | ||
Nov 20 2018 | ||
1.Fixed the bug that json data cannot be processed in TCP/UDP. | ||
2.Fixed the bug that change the RIL interface of network protocol to solve the problem of memory leakage. | ||
3.Optimized the behavior to obtain receiving format in TCP/UDP. | ||
4.Fixed the bug that the front packet data is covered by the last packet data in the onenet of write request from OneNET platform or | ||
Application Server. | ||
5.Fixed the bug that the module will crash when frequent using AT+QRST. | ||
6.Fixed the bug that -4(RIL_AT_INVALID_PARAM)is returned when calling Ql_RIL_SendATCmd() to send non AT commands. | ||
7.Modified the buffer length of the RIL interface to 1400 bytes. | ||
|
||
OpenCPU_NB1_SDK_V1.1 | ||
Aug 30 2018 | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
############################################################################################################ | ||
# | ||
# General Setting | ||
# | ||
############################################################################################################ | ||
|
||
general: | ||
config_version : v2.0 | ||
platform: MT2625 | ||
|
||
############################################################################################################ | ||
# | ||
# Main Region Setting | ||
# | ||
############################################################################################################ | ||
|
||
main_region: | ||
address_type: physical | ||
rom_list: | ||
- rom: | ||
file: APPGS3MDM32A01.bin | ||
name: MTK_APP | ||
begin_address: 0x08292000 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
custom/bsp/src/bsp_st3375.c: In function 'ST3375_ClrScr': | ||
custom/bsp/src/bsp_st3375.c:356:10: warning: unused variable 'm' [-Wunused-variable] | ||
u16 i,m,temp, *pFBuf; | ||
^ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
********************************************************************************************************* | ||
* | ||
* 模块名称 : 电池监测模块 | ||
* 文件名称 : battery.h | ||
* 说 明 : 头文件 | ||
* | ||
* 修改记录 : | ||
* 版本号 日期 作者 说明 | ||
* V1.0 2020/04/28 孟凡忠 正式发布 | ||
* | ||
* Copyright (C), 2015-2020, 华宏软件 | ||
* | ||
********************************************************************************************************* | ||
*/ | ||
|
||
#ifndef __BATTERY_H | ||
#define __BATTERY_H | ||
|
||
/* 电池充电状态 */ | ||
typedef enum | ||
{ | ||
NOT_CHARGE = 0, /* 没有充电 */ | ||
CHARGE, /* 正在充电 */ | ||
}CHARGE_STATE; | ||
|
||
/* 电池结构体 */ | ||
typedef struct | ||
{ | ||
u8 charge; /* 电池充电状态 */ | ||
u32 level; /* 电池电量 0 ~ 100 */ | ||
}BATTERY_T; | ||
|
||
/* 供外部调用的函数声明 */ | ||
void Battery_InitHard(void); | ||
void Battery_Scan(void); | ||
|
||
/* 供外部调用的变量 */ | ||
extern BATTERY_T g_battery_t; | ||
|
||
#endif | ||
|
||
/***************************** 华宏软件 (END OF FILE) *********************************/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
********************************************************************************************************* | ||
* | ||
* 模块名称 : 头文件汇总 | ||
* 文件名称 : includes.h | ||
* 版 本 : V1.0 | ||
* 说 明 : 当前使用头文件汇总 | ||
* | ||
* 修改记录 : | ||
* 版本号 日期 作者 说明 | ||
* V1.0 2020-04-28 孟凡忠 首次发布 | ||
* | ||
* Copyright (C), 2015-2020, 华宏软件 | ||
* | ||
********************************************************************************************************* | ||
*/ | ||
|
||
#ifndef __INCLUDES_H__ | ||
#define __INCLUDES_H__ | ||
|
||
/* | ||
********************************************************************************************************* | ||
* 标准库 | ||
********************************************************************************************************* | ||
*/ | ||
// #include <stdarg.h> | ||
// #include <stdio.h> | ||
// #include <stdlib.h> | ||
// #include <math.h> | ||
|
||
|
||
/* | ||
********************************************************************************************************* | ||
* 其它库 | ||
********************************************************************************************************* | ||
*/ | ||
|
||
|
||
/* | ||
********************************************************************************************************* | ||
* OS | ||
********************************************************************************************************* | ||
*/ | ||
#include "custom_feature_def.h" | ||
#include "ril.h" | ||
#include "ril_util.h" | ||
#include "ql_stdlib.h" | ||
#include "ql_error.h" | ||
#include "ql_trace.h" | ||
#include "ql_uart.h" | ||
#include "ql_system.h" | ||
#include "ql_timer.h" | ||
|
||
/* | ||
********************************************************************************************************* | ||
* 宏定义 | ||
********************************************************************************************************* | ||
*/ | ||
|
||
|
||
|
||
|
||
/* | ||
********************************************************************************************************* | ||
* APP / BSP | ||
********************************************************************************************************* | ||
*/ | ||
|
||
#include <bsp.h> | ||
#include "battery.h" | ||
|
||
/* | ||
********************************************************************************************************* | ||
* 变量和函数 | ||
********************************************************************************************************* | ||
*/ | ||
|
||
/* 在主函数中调用 */ | ||
|
||
|
||
/* | ||
********************************************************************************************************* | ||
* FatFS | ||
********************************************************************************************************* | ||
*/ | ||
|
||
|
||
#endif | ||
|
||
/***************************** 华宏软件 (END OF FILE) *********************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
********************************************************************************************************* | ||
* | ||
* 模块名称 : 电池监测模块 | ||
* 文件名称 : battery.c | ||
* 版 本 : V1.0 | ||
* 说 明 : 电池电压与充电状态监测 | ||
* | ||
* 修改记录 : | ||
* 版本号 日期 作者 说明 | ||
* V1.0 2020/04/28 孟凡忠 正式发布 | ||
* | ||
* Copyright (C), 2015-2020, 华宏软件 | ||
* | ||
********************************************************************************************************* | ||
*/ | ||
#include "bsp.h" | ||
#include "battery.h" | ||
|
||
|
||
BATTERY_T g_battery_t; /* 定义全局变量 */ | ||
|
||
// static void bsp_InitKeyVar(void); | ||
|
||
/* | ||
********************************************************************************************************* | ||
* 函 数 名: Battery_InitHard | ||
* 功能说明: 初始化电池充电状态与电量检测硬件接口(GPIO与ADC)。 | ||
* 形 参: 无 | ||
* 返 回 值: 无 | ||
********************************************************************************************************* | ||
*/ | ||
void Battery_InitHard(void) | ||
{ | ||
bsp_InitCharge(); /* 初始化充电状态GPIO口 */ | ||
bsp_InitADC(); /* 初始化电量检测ADC */ | ||
} | ||
|
||
/* | ||
********************************************************************************************************* | ||
* 函 数 名: Battery_Scan | ||
* 功能说明: 定时扫描电池状态 | ||
* 形 参: 无 | ||
* 返 回 值: 无 | ||
********************************************************************************************************* | ||
*/ | ||
void Battery_Scan(void) | ||
{ | ||
s32 result; | ||
u32 value = 0; | ||
/* 判断是否在充电 */ | ||
if( bsp_getChargeState() ) | ||
g_battery_t.charge = CHARGE; /* 正在充电 */ | ||
else | ||
g_battery_t.charge = NOT_CHARGE; /* 没有充电 */ | ||
|
||
APP_DEBUG("<--- CHARGE = %d--->\r\n",g_battery_t.charge); | ||
|
||
/* 读取ADC值,计算电池电量 */ | ||
result = bsp_SingleReadADC( &value ); | ||
if( result == QL_ADC_STATUS_OK ) | ||
{ | ||
g_battery_t.level = value; | ||
APP_DEBUG("<---bsp_SingleReadADC voltage = %d(mV)--->\r\n",value); | ||
} | ||
else | ||
{ | ||
APP_DEBUG("<---bsp_SingleReadADC false = %d--->\r\n",result); | ||
} | ||
|
||
|
||
} | ||
|
||
/*********************************** 华宏软件 (END OF FILE) ********************************************/ | ||
|
||
|
Oops, something went wrong.