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

#include "mcp23s17.h"

#if defined(TESTING)
  #include "test/MOCK_spi.h"
#elif defined(ARDUINO) && (ARDUINO <= 100)
  #include "Arduino.h"
#elif defined(SPARK)
  #include "application.h"
#else
  #include "WProgram.h"
#endif

mcp23s17::mcp23s17 (
	const HardwareAddress hw_addr_
) :
	_SPI_BUS_ADDRESS(0x40 | (hw_addr_ << 1))
{
	for ( int i = 0 ; i < REGISTER_COUNT ; ++i ) {
		_control_register_address[i] = i;
	}

	return;
}

/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */<commit_msg>Refactored default _control_register_address array load<commit_after>/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */

#include "mcp23s17.h"

#if defined(TESTING)
  #include "test/MOCK_spi.h"
#elif defined(ARDUINO) && (ARDUINO <= 100)
  #include "Arduino.h"
#elif defined(SPARK)
  #include "application.h"
#else
  #include "WProgram.h"
#endif

mcp23s17::mcp23s17 (
	const HardwareAddress hw_addr_
) :
	_SPI_BUS_ADDRESS(0x40 | (hw_addr_ << 1)),
	_control_register_address{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }
{
	return;
}

/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */
{'fraction_non_alphanumeric': 0.1417910447761194, 'fraction_numerical': 0.05447761194029851, 'mean_word_length': 4.42914979757085, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7110600', 'n_tokens_mistral': 579, 'n_tokens_neox': 509, 'n_words': 150}