<commit_before>/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */

#include <cstdint>
#include <functional>

enum BitOrder : uint8_t {
	LSBFIRST = 0,
	MSBFIRST,
};

enum ClockDivider : uint8_t {
	SPI_CLOCK_DIV4 = 0,
	SPI_CLOCK_DIV16,
	SPI_CLOCK_DIV64,
	SPI_CLOCK_DIV128,
	SPI_CLOCK_DIV2,
	SPI_CLOCK_DIV8,
	SPI_CLOCK_DIV32,
};

enum DataMode : uint8_t {
	SPI_MODE0 = 0,
	SPI_MODE1 = 4,
	SPI_MODE2 = 8,
	SPI_MODE3 = 12,
};
/*
struct SPISettings {
	
};
*/
struct MOCK_spi {
	static
	void
	begin (
		void
	);
/*	
	static
	void
	beginTransaction (
		SPISettings settings_	
	);
*/	
	static
	void
	end (
		void
	);
/*	
	static
	void
	endTransaction (
		void
	);
*/	
	static
	void
	setBitOrder (
		uint8_t bit_order_
	);
	
	static
	void
	setClockDivider (
		uint8_t clock_divider_
	);
	
	static
	void
	setDataMode (
		uint8_t data_mode_
	);
	
	static
	uint8_t
	transfer (
		uint8_t data_
	);
	
	static std::function<void(void)> _begin;
	static std::function<void(void)> _end;
	static std::function<void(uint8_t)> _setBitOrder;
	static std::function<void(uint8_t)> _setClockDivider;
	static std::function<void(uint8_t)> _setDataMode;
	static std::function<uint8_t(uint8_t)> _transfer;
};

extern MOCK_spi SPI;

/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */<commit_msg>Fixed .h file inclusion bug<commit_after>/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */

#if defined(TESTING)
#ifndef MOCK_SPI
#define MOCK_SPI

#include <cstdint>
#include <functional>

enum BitOrder : uint8_t {
	LSBFIRST = 0,
	MSBFIRST,
};

enum ClockDivider : uint8_t {
	SPI_CLOCK_DIV4 = 0,
	SPI_CLOCK_DIV16,
	SPI_CLOCK_DIV64,
	SPI_CLOCK_DIV128,
	SPI_CLOCK_DIV2,
	SPI_CLOCK_DIV8,
	SPI_CLOCK_DIV32,
};

enum DataMode : uint8_t {
	SPI_MODE0 = 0,
	SPI_MODE1 = 4,
	SPI_MODE2 = 8,
	SPI_MODE3 = 12,
};
/*
struct SPISettings {
	
};
*/
struct MOCK_spi {
	static
	void
	begin (
		void
	);
/*	
	static
	void
	beginTransaction (
		SPISettings settings_	
	);
*/	
	static
	void
	end (
		void
	);
/*	
	static
	void
	endTransaction (
		void
	);
*/	
	static
	void
	setBitOrder (
		uint8_t bit_order_
	);
	
	static
	void
	setClockDivider (
		uint8_t clock_divider_
	);
	
	static
	void
	setDataMode (
		uint8_t data_mode_
	);
	
	static
	uint8_t
	transfer (
		uint8_t data_
	);
	
	static std::function<void(void)> _begin;
	static std::function<void(void)> _end;
	static std::function<void(uint8_t)> _setBitOrder;
	static std::function<void(uint8_t)> _setClockDivider;
	static std::function<void(uint8_t)> _setDataMode;
	static std::function<uint8_t(uint8_t)> _transfer;
};

extern MOCK_spi SPI;

#endif
#endif

/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */
{'fraction_non_alphanumeric': 0.1071556993887091, 'fraction_numerical': 0.025889967637540454, 'mean_word_length': 4.0398550724637685, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '1325359', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1121, 'n_words': 258}