Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Neyzoter committed Jun 23, 2019
1 parent 3b71032 commit 501d691
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion HARDWARE/TIMER/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void TIM3_IRQHandler(void)
/* 输出50ms脉冲,用于测量同步时钟精度*/
/*! @note 测试时,需要关闭串口打印功能 @ref PRINT_UART_LOG*/
#if IO_SHINE_IN_TIMER
if(MS_TIME%20==0){//50ms输出一个脉冲
if(MS_TIME%50==0){//50ms输出一个脉冲
PAout(9) = ~PAout(9);
PAout(10) = ~PAout(10);
}
Expand Down
2 changes: 1 addition & 1 deletion HARDWARE/TIMER/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


//! 基本是10s(10000ms)更新一下
#define SYNC_INTERVAL_TIME 10000
#define SYNC_INTERVAL_TIME 2000
//! 是否让工作灯在定时器中闪烁
#define WORKING_LED_SHINE_IN_TIMER 1
//! 是否让展示nodeId灯在定时器中闪烁
Expand Down
2 changes: 1 addition & 1 deletion HARDWARE/WIFI/userwifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "can1.h"
#include "can2.h"

u8 DATA_AUTO_CHECK_EN = 1; //是否在中断中自动check数据
volatile u8 DATA_AUTO_CHECK_EN = 1; //是否在中断中自动check数据
u32 SYSTEMTIME = 0; //系统时间
u32 YYMMDD =0; //年月日
u8 Time_Sync_Flag = 0; //最近时钟是否同步
Expand Down
2 changes: 1 addition & 1 deletion HARDWARE/WIFI/userwifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ extern unsigned short localModuleSocket_txrx;
extern unsigned short localSocketDescriptor_txrx;

//!是否在中断中自动check数据
extern u8 DATA_AUTO_CHECK_EN;
extern volatile u8 DATA_AUTO_CHECK_EN;

//!字节数据发送个数
extern u32 bytes_sent;
Expand Down
1 change: 1 addition & 0 deletions HARDWARE/WIFI/wificonf.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ void EXTI4_IRQHandler(void)
{
EXTI->PR |=1<<4;
rsi_app_cb.pkt_pending ++;//= RSI_TRUE;
printf("[%d] pkt_pending : %d\r\n",SYSTEMTIME,rsi_app_cb.pkt_pending);
/* 初始化时不能进行自动check*/
if( BOARD_STA == BOARD_RUNNING){
if((DATA_AUTO_CHECK_EN)&&(RSI_WIFI_OPER_MODE == RSI_WIFI_CLIENT_MODE_VAL)){//处于Clien模式,而且要使能自动check
Expand Down
7 changes: 3 additions & 4 deletions USER/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,23 +126,22 @@ void testAdc(void){
* @param None
* @retval None
*/
u8 data[1500];
void testMaxWifiSpeed(){

u8 data[1500];
rsi_send_ludp_data(localSocketDescriptor_txrx, data,1500, RSI_PROTOCOL_UDP_V4, (uint8 *)localDestIp_txrx, localDestSocket_txrx, &bytes_sent);
}
int main(void)
{
setBoardSta(BOARD_INITING);Initialization();setBoardSta(BOARD_INITED);//初始化系统
setBoardSta(BOARD_RUNNING);//运行中
u8 RspCode;u16 tcpRecvBuffLen;u8 * pRecvData;
memset(data,32,1500);
while(1)
{

// testMaxWifiSpeed();
if(RSI_WIFI_OPER_MODE == RSI_WIFI_CLIENT_MODE_VAL){
if(IAM_MASTER_CLOCK == 'Y'){
if(sync_interval_time >= SYNC_INTERVAL_TIME&&Wifi_Send_EN){
if(sync_interval_time >= SYNC_INTERVAL_TIME){
INFO_LED_CONV();//翻转
sync_interval_time = 0;
Send_Sync_Time();//时钟同步一下
Expand Down
1 change: 0 additions & 1 deletion USER/wifi_user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "wificonf.h"
#include "userwifi.h"
#include "typetrans.h"
extern u8 DATA_AUTO_CHECK_EN;
#include "rsi_global.h"
#include "rsi_config.h"
#include "rsi_app_util.h"
Expand Down

0 comments on commit 501d691

Please sign in to comment.