2016-03-16 19:54:03 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Open-RnD Sp. z o.o.
|
2017-06-21 16:36:18 +08:00
|
|
|
* Copyright (c) 2017 RnDity Sp. z o.o.
|
2016-03-16 19:54:03 +08:00
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-03-16 19:54:03 +08:00
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_DRIVERS_WATCHDOG_IWDG_STM32_H_
|
|
|
|
#define ZEPHYR_DRIVERS_WATCHDOG_IWDG_STM32_H_
|
2016-03-16 19:54:03 +08:00
|
|
|
|
Introduce new sized integer typedefs
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t. This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.
We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.
We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.
Jira: ZEP-2051
Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-19 23:32:08 +08:00
|
|
|
#include <zephyr/types.h>
|
2016-03-16 19:54:03 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Driver for Independent Watchdog (IWDG) for STM32 MCUs
|
|
|
|
*
|
2017-06-21 16:36:18 +08:00
|
|
|
* The driver targets all STM32 SoCs. For details please refer to
|
|
|
|
* an appropriate reference manual and look for chapter called:
|
2016-03-16 19:54:03 +08:00
|
|
|
*
|
2017-06-21 16:36:18 +08:00
|
|
|
* Independent watchdog (IWDG)
|
2016-03-16 19:54:03 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-06-21 16:36:18 +08:00
|
|
|
/* driver data */
|
|
|
|
struct iwdg_stm32_data {
|
|
|
|
/* IWDG peripheral instance. */
|
|
|
|
IWDG_TypeDef *Instance;
|
2016-03-16 19:54:03 +08:00
|
|
|
};
|
|
|
|
|
2017-06-21 16:36:18 +08:00
|
|
|
#define IWDG_STM32_DATA(dev) \
|
|
|
|
((struct iwdg_stm32_data * const)(dev)->driver_data)
|
2016-03-16 19:54:03 +08:00
|
|
|
|
2017-06-21 16:36:18 +08:00
|
|
|
#define IWDG_STM32_STRUCT(dev) \
|
|
|
|
((IWDG_TypeDef *)(IWDG_STM32_DATA(dev))->Instance)
|
2016-03-16 19:54:03 +08:00
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_DRIVERS_WATCHDOG_IWDG_STM32_H_ */
|