<commit_before>#ifndef VGA_MEASUREMENT_H
#define VGA_MEASUREMENT_H

#include "etl/attribute_macros.h"
#include "etl/armv7m/sys_tick.h"
#include "etl/stm32f4xx/gpio.h"

namespace vga {

void msigs_init();

ETL_INLINE void msig_a_set() {
  etl::stm32f4xx::gpioc.set(etl::stm32f4xx::Gpio::p9);
}

ETL_INLINE void msig_a_clear() {
  etl::stm32f4xx::gpioc.clear(etl::stm32f4xx::Gpio::p9);
}

ETL_INLINE void msig_a_toggle() {
  etl::stm32f4xx::gpioc.toggle(etl::stm32f4xx::Gpio::p9);
}

ETL_INLINE void msig_b_set() {
  etl::stm32f4xx::gpioc.set(etl::stm32f4xx::Gpio::p8);
}

ETL_INLINE void msig_b_clear() {
  etl::stm32f4xx::gpioc.clear(etl::stm32f4xx::Gpio::p8);
}

ETL_INLINE void msig_b_toggle() {
  etl::stm32f4xx::gpioc.toggle(etl::stm32f4xx::Gpio::p8);
}

ETL_INLINE void msig_e_set(unsigned index) {
  etl::stm32f4xx::gpioe.set((1 << index) & 0xFF);
}

ETL_INLINE void msig_e_clear(unsigned index) {
  etl::stm32f4xx::gpioe.clear((1 << index) & 0xFF);
}


void mtim_init();

ETL_INLINE unsigned mtim_get() {
  return etl::armv7m::sys_tick.read_cvr().get_current();
}

}  // namespace vga

#endif  // VGA_MEASUREMENT_H
<commit_msg>Make measurements conditional on a define.<commit_after>#ifndef VGA_MEASUREMENT_H
#define VGA_MEASUREMENT_H

#include "etl/attribute_macros.h"
#include "etl/armv7m/sys_tick.h"
#include "etl/stm32f4xx/gpio.h"

namespace vga {

void msigs_init();

#ifdef DISRUPTIVE_MEASUREMENT

ETL_INLINE void msig_a_set() {
  etl::stm32f4xx::gpioc.set(etl::stm32f4xx::Gpio::p9);
}

ETL_INLINE void msig_a_clear() {
  etl::stm32f4xx::gpioc.clear(etl::stm32f4xx::Gpio::p9);
}

ETL_INLINE void msig_a_toggle() {
  etl::stm32f4xx::gpioc.toggle(etl::stm32f4xx::Gpio::p9);
}

ETL_INLINE void msig_b_set() {
  etl::stm32f4xx::gpioc.set(etl::stm32f4xx::Gpio::p8);
}

ETL_INLINE void msig_b_clear() {
  etl::stm32f4xx::gpioc.clear(etl::stm32f4xx::Gpio::p8);
}

ETL_INLINE void msig_b_toggle() {
  etl::stm32f4xx::gpioc.toggle(etl::stm32f4xx::Gpio::p8);
}

ETL_INLINE void msig_e_set(unsigned index) {
  etl::stm32f4xx::gpioe.set((1 << index) & 0xFF);
}

ETL_INLINE void msig_e_clear(unsigned index) {
  etl::stm32f4xx::gpioe.clear((1 << index) & 0xFF);
}

#else

ETL_INLINE void msig_a_set() {}

ETL_INLINE void msig_a_clear() {}

ETL_INLINE void msig_a_toggle() {}

ETL_INLINE void msig_b_set() {}

ETL_INLINE void msig_b_clear() {}

ETL_INLINE void msig_b_toggle() {}

ETL_INLINE void msig_e_set(unsigned index) {}

ETL_INLINE void msig_e_clear(unsigned index) {}

#endif

void mtim_init();

ETL_INLINE unsigned mtim_get() {
  return etl::armv7m::sys_tick.read_cvr().get_current();
}

}  // namespace vga

#endif  // VGA_MEASUREMENT_H

{'fraction_non_alphanumeric': 0.15873015873015872, 'fraction_numerical': 0.04308390022675737, 'mean_word_length': 6.584527220630372, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '6221659', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1289, 'n_words': 161}