<commit_before>#pragma once
//=====================================================================//
/*!	@file
	@brief	遅延ユーティリティー
    @author 平松邦仁 (<EMAIL>)
	@copyright	Copyright (C) 2016, 2017 <NAME> @n
				Released under the MIT license @n
				https://github.com/hirakuni45/RX/blob/master/LICENSE
*/
//=====================================================================//
#include <cstdint>

#ifndef F_ICLK
#  error "delay.hpp requires F_ICLK to be defined"
#endif

namespace utils {

	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	/*!
		@brief  ソフトウェアー待ち
	*/
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	struct delay {

		//-----------------------------------------------------------------//
		/*!
			@brief  ループ
			@param[in]	cnt	ループ回数
		*/
		//-----------------------------------------------------------------//
		static void loop(uint32_t cnt)
		{
			while(cnt > 0) {
				asm("nop");
				--cnt;
			}
		}


		//-----------------------------------------------------------------//
		/*!
			@brief  マイクロ秒単位の待ち @n
					あまり正確では無く、速度に関連する設定に依存します。
			@param[in]	us	待ち時間（マイクロ秒）
		*/
		//-----------------------------------------------------------------//
		static void micro_second(uint32_t us)
		{
			while(us > 0) {
#if defined(SIG_RX64M) || defined(SIG_RX63T) || defined(SIG_RX71M)
				for(uint32_t n = 0; n < (F_ICLK / 4285714); ++n) {
					asm("nop");
				}
#elif defined(SIG_RX65N)
				for(uint32_t n = 0; n < (F_ICLK / 4444444); ++n) {
					asm("nop");
				}
#elif defined(SIG_RX24T)
				for(uint32_t n = 0; n < (F_ICLK / 5333333); ++n) {
					asm("nop");
				}
#elif defined(SIG_RX66T)
				for(uint32_t n = 0; n < (F_ICLK / 5333333); ++n) {
					asm("nop");
				}
#else
#  error "delay.hpp requires tune dummy operations"
#endif
				--us;
			}
		}


		//-----------------------------------------------------------------//
		/*!
			@brief  ミリ秒単位の待ち
			@param[in]	ms	待ち時間（ミリ秒）
		*/
		//-----------------------------------------------------------------//
		static void milli_second(uint32_t ms)
		{
			for(uint32_t i = 0; i < ms; ++i) {
				micro_second(1000);
			}
		}
	};
}<commit_msg>update: delay count for RX24T<commit_after>#pragma once
//=====================================================================//
/*!	@file
	@brief	遅延ユーティリティー
    @author 平松邦仁 (<EMAIL>)
	@copyright	Copyright (C) 2016, 2017 <NAME> @n
				Released under the MIT license @n
				https://github.com/hirakuni45/RX/blob/master/LICENSE
*/
//=====================================================================//
#include <cstdint>

#ifndef F_ICLK
#  error "delay.hpp requires F_ICLK to be defined"
#endif

namespace utils {

	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	/*!
		@brief  ソフトウェアー待ち
	*/
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	struct delay {

		//-----------------------------------------------------------------//
		/*!
			@brief  ループ
			@param[in]	cnt	ループ回数
		*/
		//-----------------------------------------------------------------//
		static void loop(uint32_t cnt)
		{
			while(cnt > 0) {
				asm("nop");
				--cnt;
			}
		}


		//-----------------------------------------------------------------//
		/*!
			@brief  マイクロ秒単位の待ち @n
					あまり正確では無く、速度に関連する設定に依存します。
			@param[in]	us	待ち時間（マイクロ秒）
		*/
		//-----------------------------------------------------------------//
		static void micro_second(uint32_t us)
		{
			while(us > 0) {
#if defined(SIG_RX64M) || defined(SIG_RX63T) || defined(SIG_RX71M)
				for(uint32_t n = 0; n < (F_ICLK / 4285714); ++n) {
					asm("nop");
				}
#elif defined(SIG_RX65N)
				for(uint32_t n = 0; n < (F_ICLK / 4444444); ++n) {
					asm("nop");
				}
#elif defined(SIG_RX24T)
				for(uint32_t n = 0; n < (F_ICLK / 4444444); ++n) {
					asm("nop");
				}
#elif defined(SIG_RX66T)
				for(uint32_t n = 0; n < (F_ICLK / 4444444); ++n) {
					asm("nop");
				}
#else
#  error "delay.hpp requires tune dummy operations"
#endif
				--us;
			}
		}


		//-----------------------------------------------------------------//
		/*!
			@brief  ミリ秒単位の待ち
			@param[in]	ms	待ち時間（ミリ秒）
		*/
		//-----------------------------------------------------------------//
		static void milli_second(uint32_t ms)
		{
			for(uint32_t i = 0; i < ms; ++i) {
				micro_second(1000);
			}
		}
	};
}
{'fraction_non_alphanumeric': 0.4338269319759371, 'fraction_numerical': 0.036094400740397964, 'mean_word_length': 1.5625370480142264, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '4577589', 'n_tokens_mistral': 1894, 'n_tokens_neox': 1524, 'n_words': 270}