pn532_hi3861.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**************************************************************************
  2. * @file pn532_stm32f1.h
  3. * @author Yehui from Waveshare
  4. * @license BSD
  5. *
  6. * Header file for pn532_stm32f1.c
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy
  9. * of this software and associated documnetation files (the "Software"), to deal
  10. * in the Software without restriction, including without limitation the rights
  11. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. * copies of the Software, and to permit persons to whom the Software is
  13. * furished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included in
  16. * all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. * THE SOFTWARE.
  25. **************************************************************************/
  26. #ifndef PN532_STM32F1
  27. #define PN532_STM32F1
  28. #include "pn532.h"
  29. void PN532_Init(PN532* dev);
  30. int PN532_Reset(void);
  31. void PN532_Log(const char* log);
  32. int PN532_SPI_ReadData(uint8_t* data, uint16_t count);
  33. int PN532_SPI_WriteData(uint8_t *data, uint16_t count);
  34. bool PN532_SPI_WaitReady(uint32_t timeout);
  35. int PN532_SPI_Wakeup(void);
  36. void PN532_SPI_Init(PN532* dev);
  37. int PN532_I2C_ReadData(uint8_t* data, uint16_t count);
  38. int PN532_I2C_WriteData(uint8_t *data, uint16_t count);
  39. bool PN532_I2C_WaitReady(uint32_t timeout);
  40. int PN532_I2C_Wakeup(void);
  41. void PN532_I2C_Init(PN532* dev);
  42. #endif /* PN532_STM32F1 */