Changeset 11478 for trunk/reader-common.h
- Timestamp:
- 01/18/19 23:36:20 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reader-common.h
r10376 r11478 11 11 #include "oscam-reader.h" 12 12 13 int32_t reader_cmd2icc(struct s_reader *reader, const u char *buf, const int32_t l, uchar*response, uint16_t *response_length);14 int32_t card_write(struct s_reader *reader, const u char *, const uchar *, uchar*, uint16_t *);13 int32_t reader_cmd2icc(struct s_reader *reader, const uint8_t *buf, const int32_t l, uint8_t *response, uint16_t *response_length); 14 int32_t card_write(struct s_reader *reader, const uint8_t *, const uint8_t *, uint8_t *, uint16_t *); 15 15 16 16 #define write_cmd(cmd, data) \ 17 18 19 17 { \ 18 if (card_write(reader, cmd, data, cta_res, &cta_lr)) return ERROR; \ 19 } 20 20 21 21 #define get_atr \ 22 unsigned charatr[ATR_MAX_SIZE]; \23 24 25 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); 26 26 27 27 #define get_atr2 \ 28 unsigned charatr2[ATR_MAX_SIZE]; \29 30 31 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); 32 32 33 33 #define get_hist \ 34 unsigned charhist[ATR_MAX_HISTORICAL]; \35 36 34 uint8_t hist[ATR_MAX_HISTORICAL]; \ 35 uint32_t hist_size = 0; \ 36 ATR_GetHistoricalBytes(newatr, hist, &hist_size); 37 37 38 38 #define def_resp \ 39 unsigned charcta_res[CTA_RES_LEN]; \40 41 39 uint8_t cta_res[CTA_RES_LEN]; \ 40 memset(cta_res, 0, CTA_RES_LEN); \ 41 uint16_t cta_lr; 42 42 43 43 #ifdef WITH_CARDREADER … … 53 53 void cardreader_get_card_info(struct s_reader *reader); 54 54 void cardreader_poll_status(struct s_reader *reader); 55 int32_t check_sct_len(const u nsigned char*data, int32_t off);55 int32_t check_sct_len(const uint8_t *data, int32_t off); 56 56 #else 57 57 static inline void cardreader_init_locks(void) { }
Note:
See TracChangeset
for help on using the changeset viewer.