Home
last modified time | relevance | path

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

123

/external/libese/libese/
Dese.c28 ESE_API const char *ese_name(const struct EseInterface *ese) { in ese_name() argument
29 if (!ese) { in ese_name()
32 if (ese->ops->name) { in ese_name()
33 return ese->ops->name; in ese_name()
38 ESE_API int ese_open(struct EseInterface *ese, void *hw_opts) { in ese_open() argument
39 if (!ese) { in ese_open()
42 ALOGV("opening interface '%s'", ese_name(ese)); in ese_open()
43 ese->error.is_err = false; in ese_open()
44 ese->error.code = 0; in ese_open()
45 if (ese->ops->open) { in ese_open()
[all …]
/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.c53 int nxp_pn80t_open(struct EseInterface *ese, void *board) { in nxp_pn80t_open() argument
56 _static_assert(sizeof(ese->pad) >= sizeof(struct NxpState *), in nxp_pn80t_open()
58 platform = ese->ops->opts; in nxp_pn80t_open()
64 ese_set_error(ese, kNxpPn80tErrorPlatformInit); in nxp_pn80t_open()
68 ns = NXP_PN80T_STATE(ese); in nxp_pn80t_open()
69 TEQ1_INIT_CARD_STATE((struct Teq1CardState *)(&ese->pad[0])); in nxp_pn80t_open()
73 ese_set_error(ese, kNxpPn80tErrorPlatformInit); in nxp_pn80t_open()
94 uint32_t nxp_pn80t_send_cooldown(struct EseInterface *ese, bool end);
96 int nxp_pn80t_reset(struct EseInterface *ese) { in nxp_pn80t_reset() argument
97 const struct Pn80tPlatform *platform = ese->ops->opts; in nxp_pn80t_reset()
[all …]
Dnq_nci.c117 uint32_t nq_transmit(struct EseInterface *ese, const uint8_t *buf, uint32_t len, in nq_transmit() argument
119 struct NxpState *ns = NXP_PN80T_STATE(ese); in nq_transmit()
120 const struct Pn80tPlatform *platform = ese->ops->opts; in nq_transmit()
124 ese_set_error(ese, kNxpPn80tErrorTransmitSize); in nq_transmit()
137 ese_set_error(ese, kNxpPn80tErrorTransmit); in nq_transmit()
147 uint32_t nq_receive(struct EseInterface *ese, uint8_t *buf, uint32_t len, in nq_receive() argument
149 const struct Pn80tPlatform *platform = ese->ops->opts; in nq_receive()
150 struct NxpState *ns = NXP_PN80T_STATE(ese); in nq_receive()
157 ese_set_error(ese, kNxpPn80tErrorReceiveSize); in nq_receive()
174 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()
/external/libese/libese-teq1/tests/
Dese_operations_wrapper.cpp25 struct EseInterface *ese, EseOperationsInterface *ops_interface) { in InitializeEse() argument
28 ese_init(ese, data.wrapper); in InitializeEse()
31 static int EseOpen(struct EseInterface *ese, void *data) { in EseOpen() argument
32 return EseOperationsWrapperData::ops_interface->EseOpen(ese, data); in EseOpen()
35 static uint32_t EseHwReceive(struct EseInterface *ese, uint8_t *data, uint32_t len, int complete) { in EseHwReceive() argument
36 return EseOperationsWrapperData::ops_interface->EseHwReceive(ese, data, len, complete); in EseHwReceive()
39 static uint32_t EseHwTransmit(struct EseInterface *ese, const uint8_t *data, uint32_t len, int comp… in EseHwTransmit() argument
40 return EseOperationsWrapperData::ops_interface->EseHwTransmit(ese, data, len, complete); in EseHwTransmit()
43 static int EseReset(struct EseInterface *ese) { in EseReset() argument
44 return EseOperationsWrapperData::ops_interface->EseReset(ese); in EseReset()
[all …]
Dese_operations_interface.h28 virtual int EseOpen(struct EseInterface *ese, void *data) = 0;
29 …virtual uint32_t EseHwReceive(struct EseInterface *ese, uint8_t *data, uint32_t len, int complete)…
30 …virtual uint32_t EseHwTransmit(struct EseInterface *ese, const uint8_t *data, uint32_t len, int co…
31 virtual int EseReset(struct EseInterface *ese) = 0;
32 …virtual uint32_t EseTransceive(struct EseInterface *ese, const struct EseSgBuffer *tx_sg, uint32_t…
34 virtual int EsePoll(struct EseInterface *ese, uint8_t poll_for, float timeout, int complete) = 0;
35 virtual void EseClose(struct EseInterface *ese) = 0;
/external/libese/apps/boot/tests/
Dese_operations_wrapper.cpp24 struct EseInterface *ese, EseOperationsInterface *ops_interface) { in InitializeEse() argument
27 ese_init(ese, data.wrapper); in InitializeEse()
30 static int EseOpen(struct EseInterface *ese, void *data) { in EseOpen() argument
31 return EseOperationsWrapperData::ops_interface->EseOpen(ese, data); in EseOpen()
34 static uint32_t EseHwReceive(struct EseInterface *ese, uint8_t *data, uint32_t len, int complete) { in EseHwReceive() argument
35 return EseOperationsWrapperData::ops_interface->EseHwReceive(ese, data, len, complete); in EseHwReceive()
38 static uint32_t EseHwTransmit(struct EseInterface *ese, const uint8_t *data, uint32_t len, int comp… in EseHwTransmit() argument
39 return EseOperationsWrapperData::ops_interface->EseHwTransmit(ese, data, len, complete); in EseHwTransmit()
42 static int EseReset(struct EseInterface *ese) { in EseReset() argument
43 return EseOperationsWrapperData::ops_interface->EseReset(ese); in EseReset()
[all …]
Dese_operations_interface.h28 virtual int EseOpen(struct EseInterface *ese, void *data) = 0;
29 …virtual uint32_t EseHwReceive(struct EseInterface *ese, uint8_t *data, uint32_t len, int complete)…
30 …virtual uint32_t EseHwTransmit(struct EseInterface *ese, const uint8_t *data, uint32_t len, int co…
31 virtual int EseReset(struct EseInterface *ese) = 0;
32 …virtual uint32_t EseTransceive(struct EseInterface *ese, const struct EseSgBuffer *tx_sg, uint32_t…
34 virtual int EsePoll(struct EseInterface *ese, uint8_t poll_for, float timeout, int complete) = 0;
35 virtual void EseClose(struct EseInterface *ese) = 0;
Dese_app_boot_tests.cpp35 virtual int EseOpen(struct EseInterface *ese, void *data) { in EseOpen() argument
38 virtual uint32_t EseHwReceive(struct EseInterface *ese, uint8_t *data, in EseHwReceive() argument
40 virtual uint32_t EseHwTransmit(struct EseInterface *ese, const uint8_t *data, in EseHwTransmit() argument
42 virtual int EseReset(struct EseInterface *ese) { return -1; } in EseReset() argument
43 virtual int EsePoll(struct EseInterface *ese, uint8_t poll_for, float timeout, int complete) { in EsePoll() argument
46 virtual void EseClose(struct EseInterface *ese) { } in EseClose() argument
48 …virtual uint32_t EseTransceive(struct EseInterface *ese, const struct EseSgBuffer *tx_sg, uint32_t… in EseTransceive() argument
/external/libese/tools/ese_replay/
Dmain.c79 struct EseInterface ese; in main() local
82 if (!initialize_hardware(&ese, hw)) { in main()
86 printf("eSE implementation selected: %s\n", ese_name(&ese)); in main()
87 if (ese_open(&ese, hw->options)) { in main()
89 if (ese_error(&ese)) { in main()
90 ALOGE("eSE error (%d): %s", ese_error_code(&ese), in main()
91 ese_error_message(&ese)); in main()
107 &ese, payload.tx.buffer, payload.tx.len, reply.buffer, reply.size); in main()
108 if ((int)reply.len < 0 || ese_error(&ese)) { in main()
111 if (ese_error(&ese)) { in main()
[all …]
/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",
35 name: "ese-relay-pn80t-nq-nci",
36 defaults: ["ese-relay-defaults"],
42 name: "ese-relay-pn80t-spidev",
43 defaults: ["ese-relay-defaults"],
49 name: "ese-relay-fake",
50 defaults: ["ese-relay-defaults"],
/external/libese/apps/weaver/
Dweaver.c69 session->ese = NULL; in ese_weaver_session_init()
74 ESE_API EseAppResult ese_weaver_session_open(struct EseInterface *ese, in ese_weaver_session_open() argument
80 if (!ese || !session) { in ese_weaver_session_open()
89 rx_len = ese_transceive(ese, kManageChannelOpen, sizeof(kManageChannelOpen), in ese_weaver_session_open()
91 if (ese_error(ese)) { in ese_weaver_session_open()
92 ALOGE("transceive error: code:%d message:'%s'", ese_error_code(ese), in ese_weaver_session_open()
93 ese_error_message(ese)); in ese_weaver_session_open()
115 session->ese = ese; in ese_weaver_session_open()
126 rx_len = ese_transceive_sg(ese, tx, 2, &rx, 1); in ese_weaver_session_open()
127 if (rx_len < 0 || ese_error(ese)) { in ese_weaver_session_open()
[all …]
/external/libese/apps/boot/
Dboot.c61 session->ese = NULL; in ese_boot_session_init()
66 ESE_API EseAppResult ese_boot_session_open(struct EseInterface *ese, in ese_boot_session_open() argument
72 if (!ese || !session) { in ese_boot_session_open()
81 rx_len = ese_transceive(ese, kManageChannelOpen, sizeof(kManageChannelOpen), in ese_boot_session_open()
83 if (ese_error(ese)) { in ese_boot_session_open()
84 ALOGE("transceive error: code:%d message:'%s'", ese_error_code(ese), in ese_boot_session_open()
85 ese_error_message(ese)); in ese_boot_session_open()
107 session->ese = ese; in ese_boot_session_open()
118 rx_len = ese_transceive_sg(ese, tx, 2, &rx, 1); in ese_boot_session_open()
119 if (rx_len < 0 || ese_error(ese)) { in ese_boot_session_open()
[all …]
Dese_boot_tool.cpp57 #define handle_error(ese, result) ; argument
59 void handle_error(struct EseInterface *ese, EseAppResult result) {
308 handle_error(session->ese, res); in handle_lock_state()
317 handle_error(session->ese, res); in handle_lock_state()
370 handle_error(session->ese, res); in handle_lock_state()
399 handle_error(session->ese, res); in handle_rollback()
409 handle_error(session->ese, res); in handle_rollback()
442 struct EseInterface ese = ESE_INITIALIZER(ESE_HW_NXP_PN80T_NQ_NCI); in main() local
443 if (ese_open(&ese, nullptr) != 0) { in main()
449 EseAppResult res = ese_boot_session_open(&ese, &session); in main()
[all …]
/external/libese/esed/
Desed.rc3 user ese
4 group ese
7 mkdir /data/vendor/ese 0761 ese ese
8 restorecon /data/vendor/ese
14 user ese
15 group ese
Desed.cpp49 EseInterfaceImpl ese; in main() local
52 ese.init(); in main()
53 if (ese.open() < 0) { in main()
55 if (ese.error()) { in main()
56 errMsg += " (" + std::to_string(ese.error_code()) + "): " + ese.error_message(); in main()
71 ese.close(); in main()
80 sp<Weaver> weaver = new Weaver{ese}; in main()
DOemLock.cpp40 ScopedEseConnection ese{mEse}; in setOemUnlockAllowedByCarrier() local
41 ese.init(); in setOemUnlockAllowedByCarrier()
86 ScopedEseConnection ese{mEse}; in isOemUnlockAllowedByCarrier() local
87 ese.init(); in isOemUnlockAllowedByCarrier()
124 ScopedEseConnection ese{mEse}; in setOemUnlockAllowedByDevice() local
125 ese.init(); in setOemUnlockAllowedByDevice()
156 ScopedEseConnection ese{mEse}; in isOemUnlockAllowedByDevice() local
157 ese.init(); in isOemUnlockAllowedByDevice()
DWeaver.cpp42 ScopedEseConnection ese{mEse}; in getConfig() local
43 ese.init(); in getConfig()
81 ScopedEseConnection ese{mEse}; in write() local
82 ese.init(); in write()
125 ScopedEseConnection ese{mEse}; in read() local
126 ese.init(); in read()
/external/libese/libese/include/ese/
Dese.h71 const char *ese_name(const struct EseInterface *ese);
72 int ese_open(struct EseInterface *ese, void *hw_opts);
73 void ese_close(struct EseInterface *ese);
74 int ese_transceive(struct EseInterface *ese, const uint8_t *tx_buf, uint32_t tx_len, uint8_t *rx_bu…
75 int ese_transceive_sg(struct EseInterface *ese, const struct EseSgBuffer *tx, uint32_t tx_segs,
78 bool ese_error(const struct EseInterface *ese);
79 const char *ese_error_message(const struct EseInterface *ese);
80 int ese_error_code(const struct EseInterface *ese);
/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-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()
560 ESE_API uint32_t teq1_transceive(struct EseInterface *ese, in teq1_transceive() argument
575 struct Teq1CardState *card_state = (struct Teq1CardState *)(&ese->pad[0]); in teq1_transceive()
595 teq1_transmit(ese, opts, tx); in teq1_transceive()
[all …]

123