summaryrefslogtreecommitdiff
path: root/bsp/Infineon/libraries/HAL_Drivers/drv_gpio.h
blob: 2b3b6f06ebc3d2f0d172c25d99de263c2ee9c682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright (c) 2006-2024 RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author            Notes
 * 2022-07-1      Rbb666            first version
 */

#ifndef __DRV_GPIO_H__
#define __DRV_GPIO_H__

#include <rthw.h>
#include <rtdevice.h>
#include "drv_common.h"
#include "cyhal_irq_impl.h"

#define GPIO_INTERRUPT_PRIORITY (7u)

#define GET_PIN(PORTx,PIN)      ((((uint8_t)(PORTx)) << 3U) + ((uint8_t)(PIN)))

struct pin_irq_map
{
    rt_uint16_t port;
#if defined(SOC_SERIES_IFX_XMC)
    rt_uint32_t irqno;
#else
    IRQn_Type irqno;
#endif
};

int rt_hw_pin_init(void);

#endif /* __DRV_GPIO_H__ */