Ignore:
Timestamp:
01/18/19 23:36:20 (2 years ago)
Author:
Gorgone Impertinence
Message:

big cleanup pack 4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/reader-common.h

    r10376 r11478  
    1111#include "oscam-reader.h"
    1212
    13 int32_t reader_cmd2icc(struct s_reader *reader, const uchar *buf, const int32_t l, uchar *response, uint16_t *response_length);
    14 int32_t card_write(struct s_reader *reader, const uchar *, const uchar *, uchar *, uint16_t *);
     13int32_t reader_cmd2icc(struct s_reader *reader, const uint8_t *buf, const int32_t l, uint8_t *response, uint16_t *response_length);
     14int32_t card_write(struct s_reader *reader, const uint8_t *, const uint8_t *, uint8_t *, uint16_t *);
    1515
    1616#define write_cmd(cmd, data) \
    17     { \
    18         if (card_write(reader, cmd, data, cta_res, &cta_lr)) return ERROR; \
    19     }
     17    { \
     18        if (card_write(reader, cmd, data, cta_res, &cta_lr)) return ERROR; \
     19    }
    2020
    2121#define get_atr \
    22     unsigned char atr[ATR_MAX_SIZE]; \
    23     uint32_t atr_size; \
    24     memset(atr, 0, sizeof(atr)); \
    25     ATR_GetRaw(newatr, atr, &atr_size);
     22    uint8_t atr[ATR_MAX_SIZE]; \
     23    uint32_t atr_size; \
     24    memset(atr, 0, sizeof(atr)); \
     25    ATR_GetRaw(newatr, atr, &atr_size);
    2626
    2727#define get_atr2 \
    28     unsigned char atr2[ATR_MAX_SIZE]; \
    29     uint32_t atr_size2; \
    30     memset(atr2, 0, sizeof(atr2)); \
    31     ATR_GetRaw(newatr, atr2, &atr_size2);
     28    uint8_t atr2[ATR_MAX_SIZE]; \
     29    uint32_t atr_size2; \
     30    memset(atr2, 0, sizeof(atr2)); \
     31    ATR_GetRaw(newatr, atr2, &atr_size2);
    3232
    3333#define get_hist \
    34     unsigned char hist[ATR_MAX_HISTORICAL]; \
    35     uint32_t hist_size = 0; \
    36     ATR_GetHistoricalBytes(newatr, hist, &hist_size);
     34    uint8_t hist[ATR_MAX_HISTORICAL]; \
     35    uint32_t hist_size = 0; \
     36    ATR_GetHistoricalBytes(newatr, hist, &hist_size);
    3737
    3838#define def_resp \
    39     unsigned char cta_res[CTA_RES_LEN]; \
    40     memset(cta_res, 0, CTA_RES_LEN); \
    41     uint16_t cta_lr;
     39    uint8_t cta_res[CTA_RES_LEN]; \
     40    memset(cta_res, 0, CTA_RES_LEN); \
     41    uint16_t cta_lr;
    4242
    4343#ifdef WITH_CARDREADER
     
    5353void cardreader_get_card_info(struct s_reader *reader);
    5454void cardreader_poll_status(struct s_reader *reader);
    55 int32_t check_sct_len(const unsigned char *data, int32_t off);
     55int32_t check_sct_len(const uint8_t *data, int32_t off);
    5656#else
    5757static inline void cardreader_init_locks(void) { }
Note: See TracChangeset for help on using the changeset viewer.