aboutsummaryrefslogtreecommitdiff
path: root/platform/ext/target/cypress/psoc64/Device/Include/device_definition.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ext/target/cypress/psoc64/Device/Include/device_definition.h')
-rw-r--r--platform/ext/target/cypress/psoc64/Device/Include/device_definition.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/platform/ext/target/cypress/psoc64/Device/Include/device_definition.h b/platform/ext/target/cypress/psoc64/Device/Include/device_definition.h
index 981a0e05f8..efa3d3fceb 100644
--- a/platform/ext/target/cypress/psoc64/Device/Include/device_definition.h
+++ b/platform/ext/target/cypress/psoc64/Device/Include/device_definition.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2018 Arm Limited
+ * Copyright (c) 2020, Cypress Semiconductor Corporation. All rights reserved.
*
* Licensed under the Apache License Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,4 +51,26 @@ extern struct timer_cmsdk_dev_t CMSDK_TIMER1_DEV_S;
extern struct timer_cmsdk_dev_t CMSDK_TIMER1_DEV_NS;
#endif
+#if defined(CY_TCPWM0_TIMER0_S) || defined(CY_TCPWM0_TIMER1_NS)
+#include "cy_tcpwm_counter.h"
+typedef struct tfm_timer_irq_test_dev {
+ bool is_initialized;
+ TCPWM_Type *tcpwm_base;
+ uint32_t tcpwm_counter_num;
+ uint32_t timer_match_value;
+ cy_stc_tcpwm_counter_config_t *tcpwm_config;
+} tfm_timer_irq_test_dev_t;
+#endif
+#ifdef CY_TCPWM0_TIMER0_S
+#include "cy_sysint.h"
+extern cy_stc_sysint_t CY_TCPWM_NVIC_CFG_S;
+extern void TFM_TIMER0_IRQ_Handler(void);
+extern tfm_timer_irq_test_dev_t CY_TCPWM0_TIMER0_DEV_S;
+#define TIMER0_MATCH (1000000 / 8) /* About 1 seconds (CM0+: 50MHz) */
+#endif
+#ifdef CY_TCPWM0_TIMER1_NS
+extern tfm_timer_irq_test_dev_t CY_TCPWM0_TIMER1_DEV_NS;
+#define TIMER1_MATCH (1000000 / 8) /* About 2 seconds (CM4: 100MHz) */
+#endif
+
#endif /* __DEVICE_DEFINITION_H__ */