diff --git a/hal/m258ke/hardware.h b/hal/m258ke/hardware.h new file mode 100644 index 0000000..e6e8d72 --- /dev/null +++ b/hal/m258ke/hardware.h @@ -0,0 +1,65 @@ +/* + * hardware.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 . + * + */ + +#ifndef HAL_M258KE_HARDWARE_H_ +#define HAL_M258KE_HARDWARE_H_ + +#include +#include +#include "nuvoton/NuMicro.h" + +/** Disables interrupts + * + */ +static inline void DisableInterrupts(void) +{ + __disable_irq(); +} + +/** Enables interrupts + * + */ +static inline void EnableInterrupts(void) +{ + __enable_irq(); +} + +/** Blocks for the specified number of milliseconds + * + * @param ms The number of milliseconds to wait + */ +static inline void DelayMS(uint32_t ms) +{ + +} + +/** Blocks for the specified number of microseconds + * + * @param us The number of microseconds to wait + */ +static inline void DelayUS(uint32_t us) +{ + +} + +#endif /* HAL_M258KE_HARDWARE_H_ */