12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /*
- * BSD 2-Clause License
- * Copyright (c) 2022, LiteEMF
- * All rights reserved.
- * This software component is licensed by LiteEMF under BSD 2-Clause license,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/BSD-2-Clause
- *
- */
- #ifndef _hal_gpio_h
- #define _hal_gpio_h
- #include "emf_typedef.h"
- #include "py32f002b_ll_gpio.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /******************************************************************************************************
- ** Defined
- *******************************************************************************************************/
- #define HW_PORTA_BASE 0x00
- #define HW_PORTB_BASE 0x10
- #define HW_PORTC_BASE 0x20
- #define HW_PORTD_BASE 0x30
- #define HW_PIN_MASK 0x0F
- #define HW_PORT_MASK 0xF0
- /******************************************************************************************************
- ** Parameters
- *******************************************************************************************************/
- GPIO_TypeDef * get_gpio_port(pin_t io);
- uint32_t get_gpio_rcc(pin_t io);
- uint32_t get_gpio_pin(pin_t io);
- /*****************************************************************************************************
- ** Function
- ******************************************************************************************************/
- #ifdef __cplusplus
- }
- #endif
- #endif
|