You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openpgp-card-app/unit-tests/mocks/os.h

23 lines
689 B
C

#include <stdint.h>
#include <string.h>
#undef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define PRINTF(...)
#define THROW(x)
// send tx_len bytes (atr or rapdu) and retrieve the length of the next command apdu (over the
// requested channel)
#define CHANNEL_APDU 0
#define IO_RETURN_AFTER_TX 0x20
#define IO_ASYNCH_REPLY 0x10 // avoid apdu state reset if tx_len == 0 when we're expected to reply
#define IO_APDU_BUFFER_SIZE (255 + 5 + 64)
extern unsigned char G_io_apdu_buffer[IO_APDU_BUFFER_SIZE];
extern unsigned short io_exchange(unsigned char channel_and_flags, unsigned short tx_len);
extern void nvm_write(void *dst_adr, void *src_adr, unsigned int src_len);