unsigned int pulses;
};
-static inline int extract_datetime(unsigned char *buffer, struct datetime *d)
+static inline int extract_datetime(uint8_t *buffer, struct datetime *d)
{
int ret;
}
/* TODO: it would be better to separate decoding data from printing it */
-static int decode_eeprom(unsigned char *buffer,
+static int decode_eeprom(uint8_t *buffer,
unsigned int len,
unsigned int user_mask)
{
return 0;
}
-static int decode_datetime(unsigned char *buffer, unsigned int len)
+static int decode_datetime(uint8_t *buffer, unsigned int len)
{
int ret;
- unsigned char code[4] = { 0 };
+ uint8_t code[4] = { 0 };
struct datetime d;
- unsigned char *pbuffer = buffer;
+ uint8_t *pbuffer = buffer;
if (len != 15)
return -EINVAL;
{
int ret;
int transferred;
- unsigned char request[5];
+ uint8_t request[5];
request[0] = STX;
request[1] = command_codes[cmd][0];
}
static int get_response(libusb_device_handle *dev,
- unsigned char *buffer,
+ uint8_t *buffer,
unsigned int len)
{
int ret;
int transferred;
- unsigned char response[64] = { 0 };
+ uint8_t response[64] = { 0 };
unsigned int i;
i = 0;
static int visomat_dump_eeprom(visomat_device *dev, unsigned int user_mask)
{
/* Assuming an EEPROM of 1 KiB */
- unsigned char buffer[1024] = { 0 };
+ uint8_t buffer[1024] = { 0 };
int ret;
ret = send_command(dev, VISOMAT_CMD_DUMP_EEPROM);
static int visomat_get_datetime(visomat_device *dev)
{
- unsigned char buffer[255] = { 0 };
+ uint8_t buffer[255] = { 0 };
int ret;
ret = send_command(dev, VISOMAT_CMD_GET_DATETIME);