Home
last modified time | relevance | path

Searched refs:ese (Results 1 – 25 of 36) sorted by relevance

12

/external/libese/libese/
Dese.c30 API const char *ese_name(const struct EseInterface *ese) { in ese_name() argument
31 if (!ese) { in ese_name()
34 if (ese->ops->name) { in ese_name()
35 return ese->ops->name; in ese_name()
40 API int ese_open(struct EseInterface *ese, void *hw_opts) { in ese_open() argument
41 if (!ese) { in ese_open()
44 ALOGV("opening interface '%s'", ese_name(ese)); in ese_open()
45 if (ese->ops->open) { in ese_open()
46 return ese->ops->open(ese, hw_opts); in ese_open()
51 API const char *ese_error_message(const struct EseInterface *ese) { in ese_error_message() argument
[all …]
DAndroid.bp23 "ese.c",
/external/libese/libese-hw/
Dese_hw_fake.c42 static int fake_open(struct EseInterface *ese, in fake_open() argument
44 ese->pad[0] = 1; /* rx complete */ in fake_open()
45 ese->pad[1] = 1; /* tx complete */ in fake_open()
49 static void fake_close(struct EseInterface *ese) { in fake_close() argument
50 if (!ese->pad[0] || !ese->pad[1]) { in fake_close()
52 ese_set_error(ese, kEseFakeHwErrorEarlyClose); in fake_close()
57 static uint32_t fake_receive(struct EseInterface *ese, uint8_t *buf, in fake_receive() argument
59 if (!ese->pad[1]) { in fake_receive()
60 ese_set_error(ese, kEseFakeHwErrorReceiveDuringTransmit); in fake_receive()
63 ese->pad[0] = complete; in fake_receive()
[all …]
Dese_hw_echo.c34 #define ECHO_STATE(ese) (*(struct EchoState **)(&ese->pad[1])) argument
36 static int echo_open(struct EseInterface *ese, void *hw_opts) { in echo_open() argument
39 if (sizeof(ese->pad) < sizeof(struct EchoState *)) { in echo_open()
41 ALOGE("Pad size too small to use Echo HW (%zu < %zu)", sizeof(ese->pad), in echo_open()
45 es_ptr = &ECHO_STATE(ese); in echo_open()
50 es = ECHO_STATE(ese); in echo_open()
57 static void echo_close(struct EseInterface *ese) { in echo_close() argument
59 es = ECHO_STATE(ese); in echo_close()
67 static uint32_t echo_receive(struct EseInterface *ese, uint8_t *buf, in echo_receive() argument
69 struct EchoState *es = ECHO_STATE(ese); in echo_receive()
[all …]
/external/libese/libese-hw/nxp/pn80t/
Dcommon.c54 int nxp_pn80t_open(struct EseInterface *ese, void *board) { in nxp_pn80t_open() argument
57 if (sizeof(ese->pad) < sizeof(struct NxpState *)) { in nxp_pn80t_open()
59 ALOGE("Pad size too small to use NXP HW (%zu < %zu)", sizeof(ese->pad), in nxp_pn80t_open()
63 platform = ese->ops->opts; in nxp_pn80t_open()
72 ns = NXP_PN80T_STATE(ese); in nxp_pn80t_open()
73 TEQ1_INIT_CARD_STATE((struct Teq1CardState *)(&ese->pad[0])); in nxp_pn80t_open()
77 ese_set_error(ese, kNxpPn80tErrorPlatformInit); in nxp_pn80t_open()
99 int nxp_pn80t_reset(struct EseInterface *ese) { in nxp_pn80t_reset() argument
100 const struct Pn80tPlatform *platform = ese->ops->opts; in nxp_pn80t_reset()
101 struct NxpState *ns = NXP_PN80T_STATE(ese); in nxp_pn80t_reset()
[all …]
Dnq_nci.c102 uint32_t nq_transmit(struct EseInterface *ese, const uint8_t *buf, uint32_t len, in nq_transmit() argument
104 struct NxpState *ns = NXP_PN80T_STATE(ese); in nq_transmit()
105 const struct Pn80tPlatform *platform = ese->ops->opts; in nq_transmit()
109 ese_set_error(ese, kNxpPn80tErrorTransmitSize); in nq_transmit()
122 ese_set_error(ese, kNxpPn80tErrorTransmit); in nq_transmit()
132 uint32_t nq_receive(struct EseInterface *ese, uint8_t *buf, uint32_t len, in nq_receive() argument
134 const struct Pn80tPlatform *platform = ese->ops->opts; in nq_receive()
135 struct NxpState *ns = NXP_PN80T_STATE(ese); in nq_receive()
142 ese_set_error(ese, kNxpPn80tErrorReceiveSize); in nq_receive()
159 ese_set_error(ese, kNxpPn80tErrorReceive); in nq_receive()
Dlinux_spidev.c177 uint32_t spidev_transmit(struct EseInterface *ese, const uint8_t *buf, in spidev_transmit() argument
179 struct NxpState *ns = NXP_PN80T_STATE(ese); in spidev_transmit()
193 ese_set_error(ese, kNxpPn80tErrorTransmitSize); in spidev_transmit()
199 ese_set_error(ese, kNxpPn80tErrorTransmit); in spidev_transmit()
206 uint32_t spidev_receive(struct EseInterface *ese, uint8_t *buf, uint32_t len, in spidev_receive() argument
208 struct NxpState *ns = NXP_PN80T_STATE(ese); in spidev_receive()
222 ese_set_error(ese, kNxpPn80tErrorReceiveSize); in spidev_receive()
229 ese_set_error(ese, kNxpPn80tErrorReceive); in spidev_receive()
DREADME.md15 #include "../include/ese/hw/nxp/pn80t/common.h"
19 defined in "../include/ese/hw/nxp/pn80t/platform.h".
/external/libese/tools/ese_relay/
Dese_relay.c35 void ese_relay_init(struct EseInterface *ese);
74 struct EseInterface ese; in main() local
75 ese_relay_init(&ese); in main()
101 if (ese_open(&ese, kEseOpenData)) { in main()
103 if (ese_error(&ese)) in main()
104 ALOGE("eSE error (%d): %s", ese_error_code(&ese), in main()
105 ese_error_message(&ese)); in main()
152 ese.ops->hw_reset(&ese); in main()
157 ese.ops->hw_reset(&ese); in main()
172 rx_len = ese_transceive(&ese, tx_buf, tx_len, rx_buf, sizeof(rx_buf)); in main()
[all …]
DAndroid.bp18 name: "ese-relay-defaults",
34 name: "ese-relay-pn80t-nq-nci",
36 defaults: ["ese-relay-defaults"],
42 name: "ese-relay-pn80t-spidev",
44 defaults: ["ese-relay-defaults"],
50 name: "ese-relay-fake",
52 defaults: ["ese-relay-defaults"],
DREADME.md3 ese-relay connects libese's functionality to a local abstract socket on
7 ese-relay uses the same wire protocol as the
32 * Build ese-relay configured for the hardware in use.
46 $ adb shell ese-relay-<hw>
47 $ adb forward tcp:4096 localabstract:ese-relay
Dese_relay_fake.c27 void ese_relay_init(struct EseInterface *ese) { ese_init(ese, ESE_HW_FAKE); } in ese_relay_init() argument
Dese_relay_pn80t_nq_nci.c32 void ese_relay_init(struct EseInterface *ese) { in ese_relay_init() argument
33 ese_init(ese, ESE_HW_NXP_PN80T_NQ_NCI); in ese_relay_init()
Dese_relay_pn80t_spidev.c33 void ese_relay_init(struct EseInterface *ese) { in ese_relay_init() argument
34 ese_init(ese, ESE_HW_NXP_PN80T_SPIDEV); in ese_relay_init()
/external/libese/examples/
Dese_nxp_sample.c84 struct EseInterface ese = ESE_INITIALIZER(ESE_HW_NXP_PN80T_NQ_NCI); in main() local
91 if (ese_open(&ese, ese_hw_open_data) < 0) { in main()
93 if (ese_error(&ese)) in main()
94 printf("eSE error (%d): %s\n", ese_error_code(&ese), in main()
95 ese_error_message(&ese)); in main()
109 recvd = ese_transceive(&ese, (uint8_t *)apdu->bytes, apdu->length, rx_buf, in main()
111 if (ese_error(&ese)) { in main()
112 printf("An error (%d) occurred: %s", ese_error_code(&ese), in main()
113 ese_error_message(&ese)); in main()
127 ese_close(&ese); in main()
/external/libese/libese-hw/nxp/include/ese/hw/nxp/pn80t/
Dcommon.h31 #define NXP_PN80T_STATE(ese) \ argument
32 ((struct NxpState *)(&ese->pad[ESE_INTERFACE_STATE_PAD / 2]))
34 void nxp_pn80t_close(struct EseInterface *ese);
35 uint32_t nxp_pn80t_transceive(struct EseInterface *ese,
38 int nxp_pn80t_poll(struct EseInterface *ese, uint8_t poll_for, float timeout,
40 int nxp_pn80t_reset(struct EseInterface *ese);
41 int nxp_pn80t_open(struct EseInterface *ese, void *board);
/external/libese/libese/include/ese/
Dese.h69 const char *ese_name(const struct EseInterface *ese);
70 int ese_open(struct EseInterface *ese, void *hw_opts);
71 void ese_close(struct EseInterface *ese);
72 int ese_transceive(struct EseInterface *ese, const uint8_t *tx_buf, uint32_t tx_len, uint8_t *rx_bu…
74 bool ese_error(const struct EseInterface *ese);
75 const char *ese_error_message(const struct EseInterface *ese);
76 int ese_error_code(const struct EseInterface *ese);
Dese_hw_api.h184 void ese_set_error(struct EseInterface *ese, int code);
/external/libese/esed/
Desed.cpp45 EseInterfaceImpl ese; in main() local
46 ese.init(); in main()
47 if (ese.open() < 0) { in main()
49 if (ese.error()) { in main()
50 errMsg += " (" + std::to_string(ese.error_code()) + "): " + ese.error_message(); in main()
Desed.rc3 user ese
4 group ese
/external/libese/libese-teq1/
Dteq1.c99 int teq1_transmit(struct EseInterface *ese, in teq1_transmit() argument
122 ese->ops->hw_transmit(ese, frame->val, in teq1_transmit()
132 int teq1_receive(struct EseInterface *ese, in teq1_receive() argument
137 int bytes_consumed = ese->ops->poll(ese, opts->host_address, timeout, 0); in teq1_receive()
148 ese->ops->hw_receive(ese, (uint8_t *)(&frame->header.NAD + bytes_consumed), in teq1_receive()
155 ese->ops->hw_receive(ese, NULL, 0, 1); in teq1_receive()
162 ese->ops->hw_receive(ese, (uint8_t *)(&(frame->INF[0])), in teq1_receive()
546 API uint32_t teq1_transceive(struct EseInterface *ese, in teq1_transceive() argument
557 struct Teq1CardState *card_state = (struct Teq1CardState *)(&ese->pad[0]); in teq1_transceive()
575 teq1_transmit(ese, opts, tx); in teq1_transceive()
[all …]
Dteq1_private.h110 int teq1_transmit(struct EseInterface *ese,
113 int teq1_receive(struct EseInterface *ese,
/external/libese/esed/pn81a/
Dutils.h78 T transceive(::android::esed::EseInterface& ese, const CommandApdu& command,
83 const int ret = ese.transceive(command.vector(), responseBuffer);
88 if (ese.error()) {
89 errMsg += " (" + std::to_string(ese.error_code()) + "): " + ese.error_message();
/external/libese/libese-teq1/include/ese/
Dteq1.h190 uint32_t teq1_transceive(struct EseInterface *ese,
/external/libese/
DREADME.md82 (Also take a look at libese/include/ese/log.h for the macro definitions

12