mian.c
来自「无线通信的」· C语言 代码 · 共 62 行
C
62 行
/*********************************************************************************************
* File: main.c
* Author: embest
* Desc: c main entry
* History:
*********************************************************************************************/
/*--- include files ---*/
#include "44blib.h"
#include "44b.h"
/*--- function code ---*/
/*********************************************************************************************
* name: main
* func: c code entry
* para: none
* ret: none
* modify:
* comment:
*********************************************************************************************/
void Main(void)
{
int i;
sys_init(); // Initial 44B0X's Interrupt,Port and UART
// initialize the 8led-function first of ZLG7290 (more to see ZLG7290.pdf)
// present the invalid sign generated while keyboard-function
// Initialize iic
// Enable interrupt
iic_init();
for(i=0; i<8; i++)
{
iic_write(0x70, 0x10+i, 0xFF); // write data to DpRam0~DpRam7(Register of ZLG7290)
delay(5);
}
// user interface
uart_printf("\n Embest Arm EduKit II Evaluation Board\n");
uart_printf(" GPS Test Example\n");
gprs_test();
}
void eled_disp(char cWhichS,char cWhichE,char uChar)
{
int i;
iic_init();
if(cWhichS <= cWhichE)
{
for(i=cWhichS-1;i<=cWhichE-1;i++)
iic_write(0x70, 0x10+i, uChar);
}
else
{
for(i=cWhichS-1;i>=cWhichE-1;i--)
iic_write(0x70, 0x10+i, uChar);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?