k82f_hal.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef K82F_HAL_H
  2. #define K82F_HAL_H
  3. //You probably don't need this from rest of code
  4. //#include "stm32f4_hal_lowlevel.h"
  5. #ifdef USE_FULL_ASSERT
  6. /**
  7. * @brief The assert_param macro is used for function's parameters check.
  8. * @param expr: If expr is false, it calls assert_failed function
  9. * which reports the name of the source file and the source
  10. * line number of the call that failed.
  11. * If expr is true, it returns no value.
  12. * @retval None
  13. */
  14. #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
  15. /* Exported functions ------------------------------------------------------- */
  16. void assert_failed(uint8_t* file, uint32_t line);
  17. #else
  18. #define assert_param(expr) ((void)0)
  19. #endif /* USE_FULL_ASSERT */
  20. #include <stdint.h>
  21. void etmtrace_enable(void);
  22. void init_uart(void);
  23. void putch(char c);
  24. char getch(void);
  25. void trigger_setup(void);
  26. void trigger_low(void);
  27. void trigger_high(void);
  28. void HW_AES128_Init(void);
  29. void HW_AES128_LoadKey(uint8_t* key);
  30. void HW_AES128_Enc(uint8_t* pt);
  31. void HW_AES128_Enc_pretrigger(uint8_t* pt);
  32. void HW_AES128_Enc_posttrigger(uint8_t* pt);
  33. void HW_AES128_Dec(uint8_t *pt);
  34. #endif // K82F_HAL_H