etzpc.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2017-2020, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef DRIVERS_ST_ETZPC_H
  7. #define DRIVERS_ST_ETZPC_H
  8. #include <stdbool.h>
  9. #include <stdint.h>
  10. /* Define security level for each peripheral (DECPROT) */
  11. enum etzpc_decprot_attributes {
  12. ETZPC_DECPROT_S_RW = 0,
  13. ETZPC_DECPROT_NS_R_S_W = 1,
  14. ETZPC_DECPROT_MCU_ISOLATION = 2,
  15. ETZPC_DECPROT_NS_RW = 3,
  16. ETZPC_DECPROT_MAX = 4,
  17. };
  18. void etzpc_configure_decprot(uint32_t decprot_id,
  19. enum etzpc_decprot_attributes decprot_attr);
  20. enum etzpc_decprot_attributes etzpc_get_decprot(uint32_t decprot_id);
  21. void etzpc_lock_decprot(uint32_t decprot_id);
  22. void etzpc_configure_tzma(uint32_t tzma_id, uint16_t tzma_value);
  23. uint16_t etzpc_get_tzma(uint32_t tzma_id);
  24. void etzpc_lock_tzma(uint32_t tzma_id);
  25. bool etzpc_get_lock_tzma(uint32_t tzma_id);
  26. uint8_t etzpc_get_num_per_sec(void);
  27. uint8_t etzpc_get_revision(void);
  28. uintptr_t etzpc_get_base_address(void);
  29. int etzpc_init(void);
  30. #endif /* DRIVERS_ST_ETZPC_H */