Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mengfanzhong authored Jul 15, 2020
1 parent 5f438d4 commit 591867a
Show file tree
Hide file tree
Showing 100 changed files with 14,772 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Make.bat
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.
55 changes: 55 additions & 0 deletions RELEASE NOTES.txt
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 added build/gcc/APPGS3MDM32A01.bin
Binary file not shown.
Binary file added build/gcc/APPGS3MDM32A01.elf
Binary file not shown.
2,111 changes: 2,111 additions & 0 deletions build/gcc/APPGS3MDM32A01.map

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions build/gcc/app_image_bin.cfg
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


4 changes: 4 additions & 0 deletions build/gcc/build.log
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 added build/gcc/obj/custom/app/src/battery.o
Binary file not shown.
Binary file added build/gcc/obj/custom/app/src/main.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_adc.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_charge.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_cst816s.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_key.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_motor.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_spi_bus.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_spi_flash.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_st3375.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_tft_lcd.o
Binary file not shown.
Binary file added build/gcc/obj/custom/bsp/src/bsp_touch.o
Binary file not shown.
Binary file added build/gcc/obj/custom/config/custom_sys_cfg.o
Binary file not shown.
Binary file added build/gcc/obj/custom/config/sys_config.o
Binary file not shown.
Binary file added build/gcc/obj/custom/fonts/asc12x24.o
Binary file not shown.
Binary file added build/gcc/obj/custom/fonts/asc16x32.o
Binary file not shown.
Binary file added build/gcc/obj/custom/fonts/asc20x40.o
Binary file not shown.
Binary file added build/gcc/obj/custom/fonts/asc24x48.o
Binary file not shown.
Binary file added build/gcc/obj/custom/fonts/asc8x16.o
Binary file not shown.
Binary file added build/gcc/obj/custom/fonts/hz64.o
Binary file not shown.
Binary file added build/gcc/obj/custom/main.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_adc.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_dfota_http.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_eint.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_float_math.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_gpio.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_iic.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_lwm2m.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_memory.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_mqtt.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_multitask.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_onenet.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_pwm.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_rtc.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_spi.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_system.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_tcpclient.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_time.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_timer.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_udpclient.o
Binary file not shown.
Binary file added build/gcc/obj/example/example_watchdog.o
Binary file not shown.
Binary file added build/gcc/obj/example/utility.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_atResponse.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_dfota.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_init.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_lwm2m.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_mqtt.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_network.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_onenet.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_socket.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_system.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_urc.o
Binary file not shown.
Binary file added build/gcc/obj/ril/src/ril_util.o
Binary file not shown.
Binary file added cmd.exe
Binary file not shown.
44 changes: 44 additions & 0 deletions custom/app/inc/battery.h
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) *********************************/

90 changes: 90 additions & 0 deletions custom/app/inc/include.h
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) *********************************/
76 changes: 76 additions & 0 deletions custom/app/src/battery.c
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) ********************************************/


Loading

0 comments on commit 591867a

Please sign in to comment.