mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-22 18:19:03 +00:00
fix(core): fix NFC deinitialization
[no changelog]
This commit is contained in:
parent
d506abd9db
commit
3db788d80a
core/embed/io/nfc/st25r3916b
@ -13,6 +13,7 @@
|
||||
* COPYRIGHT(c) 2018 STMicroelectronics
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifdef KERNEL_MODE
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "card_emulation.h"
|
||||
@ -634,6 +635,8 @@ uint16_t card_emulation_t3t(uint8_t *rxData, uint16_t rxDataLen, uint8_t *txBuf,
|
||||
return 2;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -16,6 +16,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef KERNEL_MODE
|
||||
|
||||
#include "ndef.h"
|
||||
#include <trezor_rtl.h>
|
||||
@ -200,3 +201,5 @@ size_t ndef_create_uri(const char *uri, uint8_t *buffer, size_t buffer_size) {
|
||||
|
||||
return uri_len + NDEF_MESSAGE_URI_OVERHEAD; // return buffer len
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -17,6 +17,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef KERNEL_MODE
|
||||
|
||||
#include <trezor_bsp.h>
|
||||
#include <trezor_rtl.h>
|
||||
|
||||
@ -264,7 +266,7 @@ void nfc_deinit(void) {
|
||||
HAL_GPIO_DeInit(NFC_SPI_NSS_PORT, NFC_SPI_NSS_PIN);
|
||||
HAL_GPIO_DeInit(NFC_INT_PORT, NFC_INT_PIN);
|
||||
|
||||
memset(&drv, 0, sizeof(st25r3916b_driver_t));
|
||||
memset(drv, 0, sizeof(st25r3916b_driver_t));
|
||||
}
|
||||
|
||||
nfc_status_t nfc_register_tech(const nfc_tech_t tech) {
|
||||
@ -671,3 +673,5 @@ static nfc_status_t nfc_transcieve_blocking(uint8_t *tx_buf,
|
||||
return NFC_OK;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user