<commit_before>//=====================================================================//
/*!	@file
	@brief	ドライバー関係 @n
			Copyright 2017 <NAME>
	@author	平松邦仁 (<EMAIL>)
*/
//=====================================================================//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "phy.h"
#include "r_ether.h"
#include "../T4_src/net_config.h"
#include "../T4_src/config_tcpudp.h"

#if defined (_T4_TEST)
extern H lan_read_for_test(uint8_t lan_port_no, int8_t **buf, H return_code);
#endif


/******************************************************************************
Private global variables and functions
******************************************************************************/
uint16_t tcpudp_time_cnt;
static volatile uint8_t tcpip_flag_;
volatile uint16_t wait_timer_;
T4_STATISTICS t4_stat;
uint8_t *err_buf_ptr;


/******************************************************************************
Functions (for system that has no ET_LINKSTA pin using)
******************************************************************************/
static void polling_link_status_(void)
{
	static uint16_t _1s_timer;
	static int16_t pre_link_stat = R_PHY_ERROR;
	int16_t link_stat;

	if (!(_1s_timer++ % 100))
	{
		link_stat = phy_get_link_status();
		if (pre_link_stat != link_stat)
		{
			if (link_stat == R_PHY_OK)
			{
				g_ether_LchngFlag = ETHER_FLAG_ON_LINK_ON;
			}
			else
			{
				g_ether_LchngFlag = ETHER_FLAG_ON_LINK_OFF;
			}
		}
		pre_link_stat = link_stat;
	}
}


/******************************************************************************
Functions (Interrput handler)
******************************************************************************/
static void service_10ms_(void)
{
	if (tcpip_flag_ == 1)
	{
		_process_tcpip();
		tcpudp_time_cnt++;
	}<commit_msg>cleanup<commit_after>//=====================================================================//
/*!	@file
	@brief	ドライバー関係 @n
			Copyright 2017 <NAME>
	@author	平松邦仁 (<EMAIL>)
*/
//=====================================================================//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "phy.h"
#include "r_ether.h"
#include "../T4_src/net_config.h"
#include "../T4_src/config_tcpudp.h"

#if defined (_T4_TEST)
extern H lan_read_for_test(uint8_t lan_port_no, int8_t **buf, H return_code);
#endif


/******************************************************************************
Private global variables and functions
******************************************************************************/
uint16_t tcpudp_time_cnt;
static volatile uint8_t tcpip_flag_;
volatile uint16_t wait_timer_;
T4_STATISTICS t4_stat;
uint8_t *err_buf_ptr;


/******************************************************************************
Functions (for system that has no ET_LINKSTA pin using)
******************************************************************************/
static void polling_link_status_(void)
{
	static uint16_t timer_1s = 0;
	static int16_t pre_link_stat = R_PHY_ERROR;
	int16_t link_stat;

	if((timer_1s % 100) == 0) {
		link_stat = phy_get_link_status();
		if(pre_link_stat != link_stat) {
			if(link_stat == R_PHY_OK) {
				g_ether_LchngFlag = ETHER_FLAG_ON_LINK_ON;
			} else {
				g_ether_LchngFlag = ETHER_FLAG_ON_LINK_OFF;
			}
		}
		pre_link_stat = link_stat;
	}
	timer_1s++;
}


/******************************************************************************
Functions (Interrput handler)
******************************************************************************/
static void service_10ms_(void)
{
	if (tcpip_flag_ == 1)
	{
		_process_tcpip();
		tcpudp_time_cnt++;
	}
{'fraction_non_alphanumeric': 0.41515151515151516, 'fraction_numerical': 0.01790633608815427, 'mean_word_length': 7.104910714285714, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3788679', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1080, 'n_words': 210}