mac-rom-simm-programmer/hal/m258ke/gpio_hw.h
Doug Brown 47155a7e7d Add GPIO driver
Provide the basic functionality for setting direction, turning on and
off, toggling, reading inputs, and enabling/disabling pullups.

This chip also provides pulldowns, so in the future I will also
implement pulldown control so we can detect shorts to 5V.
2023-06-25 11:41:19 -07:00

39 lines
1.0 KiB
C

/*
* gpio_hw.h
*
* Created on: Jun 19, 2023
* Author: Doug
*
* Copyright (C) 2011-2023 Doug Brown
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifndef HAL_M258KE_GPIO_HW_H_
#define HAL_M258KE_GPIO_HW_H_
/// Enum representing the different GPIO ports available on the M258KE.
/// Used with the GPIOPin struct.
enum {
GPIOA,
GPIOB,
GPIOC,
GPIOD,
GPIOE,
GPIOF
};
#endif /* HAL_M258KE_GPIO_HW_H_ */