<commit_before>#include <avr/io.h>

#include "ShiftOut.h"



void ShiftOutByte(uint8_t CLKPin, uint8_t *ClockPORT, uint8_t DataPin, uint8_t *DataPORT, uint8_t LatchPin, uint8_t *LatchPORT, uint8_t data){
  LatchPORT &= ~(1 << LatchPin);
  
  for (int i = 0; i < 8; i++){

    ClockPORT &= ~(1 << CLKPin);
    DataPORT |= (((data & (0x01 << i)) >> i) << DataPin );
    ClockPORT |= (1 << CLKPin); 
    DataPORT &= ~(((dat a& (0x01 << i)) >> i) << DataPin );
  }

  LatchPORT |= (1 << LatchPin); 

}

void ShiftOutMultiByte(uint8_t CLKPin, uint8_t *ClockPORT, uint8_t DataPin, uint8_t *DataPORT, uint8_t LatchPin, uint8_t *LatchPORT, uint8_t *data, uint8_t NumDataByte){

  LatchPORT &= ~(1 << LatchPin);
  
  for(int i = 0; i < (8 * NumDataByte); i++){
    
    ClockPORT &= ~(1 << CLKPin);
    DataPORT |= (((data & (0x01 << i)) >> i) << DataPin );
    ClockPORT |= (1 << CLKPin);
    DataPORT &= ~(((data & (0x01 << i)) >> i) << DataPin );
    
  }
  
  LatchPORT |= (1 << LatchPin);

}
<commit_msg>Update ShiftOut.c<commit_after>#include <avr/io.h>

#include "ShiftOut.h"



void ShiftOutByte(uint8_t CLKPin, uint8_t *ClockPORT, uint8_t DataPin, uint8_t *DataPORT, uint8_t LatchPin, uint8_t *LatchPORT, uint8_t data){
  LatchPORT &= ~(1 << LatchPin);
  
  for (int i = 0; i < 8; i++){

    ClockPORT &= ~(1 << CLKPin);
    DataPORT |= (((data >> i) & 0x01) << DataPin);
    ClockPORT |= (1 << CLKPin); 
    DataPORT &= ~(((data >> i) & 0x01) << DataPin);
  }

  LatchPORT |= (1 << LatchPin); 

}

void ShiftOutMultiByte(uint8_t CLKPin, uint8_t *ClockPORT, uint8_t DataPin, uint8_t *DataPORT, uint8_t LatchPin, uint8_t *LatchPORT, uint8_t *data, uint8_t NumDataByte){

  LatchPORT &= ~(1 << LatchPin);
  
  for(int i = 0; i < (8 * NumDataByte); i++){
    
    ClockPORT &= ~(1 << CLKPin);
    DataPORT |= (((data[i] >> i ) & 0x01 ) << DataPin );
    ClockPORT |= (1 << CLKPin);
    DataPORT &= ~(((data[i] >> i ) & 0x01) << DataPin );
    
  }
  
  LatchPORT |= (1 << LatchPin);

}

{'fraction_non_alphanumeric': 0.19314170448814927, 'fraction_numerical': 0.039334341906202726, 'mean_word_length': 3.3700440528634363, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 21, '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': '3506142', 'n_tokens_mistral': 869, 'n_tokens_neox': 823, 'n_words': 194}