Platform drivers for Mbed.

Dependents:   EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more

Revision:
11:a2dcf0ebb5b5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/irq_extra.h	Mon Aug 03 17:21:20 2020 +0530
@@ -0,0 +1,84 @@
+/***************************************************************************//**
+ *   @file     irq_extra.h
+ *   @brief:   Header containing extra types required for IRQ drivers
+********************************************************************************
+ * Copyright (c) 2020 Analog Devices, Inc.
+ *
+ * All rights reserved.
+ *
+ * This software is proprietary to Analog Devices, Inc. and its licensors.
+ * By using this software you agree to the terms of the associated
+ * Analog Devices Software License Agreement.
+*******************************************************************************/
+
+#ifndef IRQ_EXTRA_H
+#define IRQ_EXTRA_H
+
+
+// Platform support needs to be C-compatible to work with other drivers
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/******************************************************************************/
+/***************************** Include Files **********************************/
+/******************************************************************************/
+
+#include <stdbool.h>
+
+/******************************************************************************/
+/********************** Macros and Constants Definitions **********************/
+/******************************************************************************/
+
+/******************************************************************************/
+/*************************** Types Declarations *******************************/
+/******************************************************************************/
+
+/**
+ * @enum irq_id
+ * @brief Interrupts IDs supported by the irq driver
+ */
+enum irq_id {
+	/** External interrupt ID */
+	EXTERNAL_INT_ID,
+	/** UART Rx interrupt ID */
+	UART_RX_INT_ID,
+	/* Number of available interrupts */
+	NB_INTERRUPTS
+};
+
+/*
+ * External IRQ events
+ * */
+typedef enum {
+	EXT_IRQ_NONE,
+	EXT_IRQ_RISE,
+	EXT_IRQ_FALL
+} ext_irq_event;
+
+/**
+ * @struct mbed_irq_init_param
+ * @brief Structure holding the extra parameters for Interrupt Request.
+ */
+typedef struct {
+	uint32_t int_mode;			// Interrupt mode (falling/rising etc)
+	void *int_obj_type;  		// Interrupt handling object
+} mbed_irq_init_param;
+
+/**
+ * @struct aducm410_irq_desc
+ * @brief Structure holding the platform descriptor for Interrupt Request.
+ */
+typedef struct {
+	uint32_t int_mode;			// Interrupt mode (falling/rising etc)
+	void *int_obj_type;  		// Interrupt handling object
+	void *int_obj;				// Interrupt object (e.g. InterruptIn)
+} mbed_irq_desc;
+
+
+#ifdef __cplusplus // Closing extern c
+}
+#endif
+
+#endif // IRQ_EXTRA_H_