<commit_before>#include <xpcc/architecture/platform.hpp>
#include "../stm32f4_discovery.hpp"

#include <xpcc/driver/inertial/lis.hpp>
#define USE_I2C 0

namespace lis
{

// Spi Transport Layer
typedef GpioOutputA5 Sck;
typedef GpioInputA6 Miso;
typedef GpioOutputA7 Mosi;
typedef GpioOutputE3 Cs;

typedef SpiMaster1 SpiMaster;
typedef xpcc::Lis302SpiTransport< SpiMaster, Cs > SpiTransport;

// I2c Transport Layer
typedef GpioA5 Scl;
typedef GpioA7 Sda;

typedef xpcc::SoftwareI2cMaster<Scl, Sda, 400000> I2cMaster;
typedef xpcc::Lis302I2cTransport< I2cMaster > I2cTransport;

// Interrupt lines
typedef GpioInputE0 Int1;
typedef GpioInputE1 Int2;

} // namespace lis

// Acceleration Data object
xpcc::lis::Data data;

// LIS302DL Driver object
#if USE_I2C
xpcc::Lis302< lis::I2cTransport > accel(data, 0x1D);
#else
xpcc::Lis302< lis::SpiTransport > accel(data);
#endif

#include <xpcc/processing.hpp>
#include <xpcc/math.hpp>

class ReaderThread : public xpcc::pt::Protothread
{
public:
	bool
	update()
	{
		PT_BEGIN();

		// ping the device until it responds
		while(true)
		{
			// we wait until the task started
			if (PT_CALL(accel.ping(this)))
				break;
			// otherwise, try again in 100ms
			this->timer.restart(100);
			LedOrange::set();
			PT_WAIT_UNTIL(this->timer.isExpired());
			LedOrange::reset();<commit_msg>Examples: STM32F4 Discovery: Renamed too much.<commit_after>#include <xpcc/architecture/platform.hpp>
#include "../stm32f4_discovery.hpp"

#include <xpcc/driver/inertial/lis302.hpp>
#define USE_I2C 0

namespace lis
{

// Spi Transport Layer
typedef GpioOutputA5 Sck;
typedef GpioInputA6 Miso;
typedef GpioOutputA7 Mosi;
typedef GpioOutputE3 Cs;

typedef SpiMaster1 SpiMaster;
typedef xpcc::Lis302SpiTransport< SpiMaster, Cs > SpiTransport;

// I2c Transport Layer
typedef GpioA5 Scl;
typedef GpioA7 Sda;

typedef xpcc::SoftwareI2cMaster<Scl, Sda, 400000> I2cMaster;
typedef xpcc::Lis302I2cTransport< I2cMaster > I2cTransport;

// Interrupt lines
typedef GpioInputE0 Int1;
typedef GpioInputE1 Int2;

} // namespace lis

// Acceleration Data object
xpcc::lis302::Data data;

// LIS302DL Driver object
#if USE_I2C
xpcc::Lis302< lis::I2cTransport > accel(data, 0x1D);
#else
xpcc::Lis302< lis::SpiTransport > accel(data);
#endif

#include <xpcc/processing.hpp>
#include <xpcc/math.hpp>

class ReaderThread : public xpcc::pt::Protothread
{
public:
	bool
	update()
	{
		PT_BEGIN();

		// ping the device until it responds
		while(true)
		{
			// we wait until the task started
			if (PT_CALL(accel.ping(this)))
				break;
			// otherwise, try again in 100ms
			this->timer.restart(100);
			LedOrange::set();
			PT_WAIT_UNTIL(this->timer.isExpired());
			LedOrange::reset();
{'fraction_non_alphanumeric': 0.11771258819160788, 'fraction_numerical': 0.04270330486446342, 'mean_word_length': 4.947019867549669, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, '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': '7313993', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1029, 'n_words': 240}