<commit_before>/****************************************************************************
 *
 * File: serial.c
 *
 * Serial communication layer.
 *
 ****************************************************************************/

/****************************************************************************
 *
 * include files
 *
 ****************************************************************************/

#include <stdio.h>
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/time.h>
#include <errno.h>
#include <sys/ioctl.h>

#include <gphoto2.h>

#include "util.h"
#include "psa50.h"


/****  new stuff ********/
#include <gpio.h>
struct camera_to_usb {
	  char *name;
	  unsigned short idVendor;
	  unsigned short idProduct;
} camera_to_usb[] = {
		{ "Canon PowerShot S10", 0x04A9, 0x3041 },
		{ "Canon PowerShot S20", 0x04A9, 0x3043 },
		{ "Canon Digital IXUS", 0x4A9, 0x3047 },
		{ "Canon Powershot S100", 0x4A9, 0x3047 }
};
/*******  new stuff *********/


/****************************************************************************
 *
 * static global storage area
 *
 ****************************************************************************/

// gpio_device *gdev;
gpio_device_settings settings;


void serial_flush_input(gpio_device *gdev)
{<commit_msg>changed USB productid of S100<commit_after>/****************************************************************************
 *
 * File: serial.c
 *
 * Serial communication layer.
 *
 ****************************************************************************/

/****************************************************************************
 *
 * include files
 *
 ****************************************************************************/

#include <stdio.h>
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/time.h>
#include <errno.h>
#include <sys/ioctl.h>

#include <gphoto2.h>

#include "util.h"
#include "psa50.h"


/****  new stuff ********/
#include <gpio.h>
struct camera_to_usb {
	  char *name;
	  unsigned short idVendor;
	  unsigned short idProduct;
} camera_to_usb[] = {
		{ "Canon PowerShot S10", 0x04A9, 0x3041 },
		{ "Canon PowerShot S20", 0x04A9, 0x3043 },
		{ "Canon Digital IXUS", 0x4A9, 0x3047 },
		{ "Canon PowerShot S100", 0x4A9, 0x3045}
};
/*******  new stuff *********/


/****************************************************************************
 *
 * static global storage area
 *
 ****************************************************************************/

// gpio_device *gdev;
gpio_device_settings settings;


void serial_flush_input(gpio_device *gdev)
{
{'fraction_non_alphanumeric': 0.46377922575699504, 'fraction_numerical': 0.03487926408585665, 'mean_word_length': 6.131147540983607, 'pattern_counts': {'":': 0, '<': 21, '<?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': '732504', 'n_tokens_mistral': 841, 'n_tokens_neox': 723, 'n_words': 156}