• Home
  • Raw
  • Download

Lines Matching refs:ese

53 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()
98 struct NxpState *ns = NXP_PN80T_STATE(ese); in nxp_pn80t_reset()
107 if (!ese_error(ese)) { in nxp_pn80t_reset()
108 const uint32_t cooldownSec = nxp_pn80t_send_cooldown(ese, false); in nxp_pn80t_reset()
109 if (!ese_error(ese) && cooldownSec > 0) { in nxp_pn80t_reset()
115 ese_set_error(ese, kNxpPn80tErrorResetToggle); in nxp_pn80t_reset()
119 ese_set_error(ese, kNxpPn80tErrorResetToggle); in nxp_pn80t_reset()
124 ese->error.is_err = false; in nxp_pn80t_reset()
128 int nxp_pn80t_poll(struct EseInterface *ese, uint8_t poll_for, float timeout, in nxp_pn80t_poll() argument
130 struct NxpState *ns = NXP_PN80T_STATE(ese); in nxp_pn80t_poll()
131 const struct Pn80tPlatform *platform = ese->ops->opts; in nxp_pn80t_poll()
144 if (ese->ops->hw_receive(ese, &byte, 1, complete) != 1) { in nxp_pn80t_poll()
146 ese_set_error(ese, kNxpPn80tErrorPollRead); in nxp_pn80t_poll()
176 uint32_t nxp_pn80t_send_cooldown(struct EseInterface *ese, bool end) { in nxp_pn80t_send_cooldown() argument
177 struct NxpState *ns = NXP_PN80T_STATE(ese); in nxp_pn80t_send_cooldown()
178 const struct Pn80tPlatform *platform = ese->ops->opts; in nxp_pn80t_send_cooldown()
185 if (ese_error(ese)) { in nxp_pn80t_send_cooldown()
189 ese->ops->hw_transmit(ese, message, message_len, 1); in nxp_pn80t_send_cooldown()
190 if (ese_error(ese)) { in nxp_pn80t_send_cooldown()
195 nxp_pn80t_poll(ese, kTeq1Options.host_address, 5.0f, 0); in nxp_pn80t_send_cooldown()
196 if (ese_error(ese)) { in nxp_pn80t_send_cooldown()
202 ese->ops->hw_receive(ese, rx_buf, sizeof(rx_buf), 1); in nxp_pn80t_send_cooldown()
203 if (ese_error(ese)) { in nxp_pn80t_send_cooldown()
246 uint32_t nxp_pn80t_handle_interface_call(struct EseInterface *ese, in nxp_pn80t_handle_interface_call() argument
252 const struct Pn80tPlatform *platform = ese->ops->opts; in nxp_pn80t_handle_interface_call()
259 struct NxpState *ns = NXP_PN80T_STATE(ese); in nxp_pn80t_handle_interface_call()
272 ese_set_error(ese, 0); in nxp_pn80t_handle_interface_call()
273 if (nxp_pn80t_reset(ese) < 0) { in nxp_pn80t_handle_interface_call()
296 const uint32_t cooldownSec = nxp_pn80t_send_cooldown(ese, false); in nxp_pn80t_handle_interface_call()
298 if (ese_error(ese)) { in nxp_pn80t_handle_interface_call()
307 uint32_t nxp_pn80t_transceive(struct EseInterface *ese, in nxp_pn80t_transceive() argument
312 nxp_pn80t_handle_interface_call(ese, tx_buf, tx_len, rx_buf, rx_len); in nxp_pn80t_transceive()
316 return teq1_transceive(ese, &kTeq1Options, tx_buf, tx_len, rx_buf, rx_len); in nxp_pn80t_transceive()
319 void nxp_pn80t_close(struct EseInterface *ese) { in nxp_pn80t_close() argument
321 struct NxpState *ns = NXP_PN80T_STATE(ese); in nxp_pn80t_close()
322 const struct Pn80tPlatform *platform = ese->ops->opts; in nxp_pn80t_close()
323 const uint32_t wait_sec = nxp_pn80t_send_cooldown(ese, true); in nxp_pn80t_close()
329 if (ese_error(ese) || wait_sec == 0) { in nxp_pn80t_close()