Fix headers guards + style fixes

This commit is contained in:
Fabio Utzig 2016-04-04 19:36:24 -03:00
parent f679a82be7
commit 4c5a09e727
13 changed files with 49 additions and 49 deletions

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _ADC_LLD_H_
#define _ADC_LLD_H_
#ifndef HAL_ADC_LLD_H
#define HAL_ADC_LLD_H
#if HAL_USE_ADC || defined(__DOXYGEN__)
@ -224,6 +224,6 @@ extern "C" {
#endif /* HAL_USE_ADC */
#endif /* _ADC_LLD_H_ */
#endif /* HAL_ADC_LLD_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _EXT_LLD_H_
#define _EXT_LLD_H_
#ifndef HAL_EXT_LLD_H
#define HAL_EXT_LLD_H
#if HAL_USE_EXT || defined(__DOXYGEN__)
@ -134,6 +134,6 @@ extern "C" {
#endif /* HAL_USE_EXT */
#endif /* _EXT_LLD_H_ */
#endif /* HAL_EXT_LLD_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _EXT_LLD_ISR_H_
#define _EXT_LLD_ISR_H_
#ifndef HAL_EXT_LLD_ISR_H
#define HAL_EXT_LLD_ISR_H
#if HAL_USE_EXT || defined(__DOXYGEN__)
@ -74,6 +74,6 @@ extern "C" {
#endif /* HAL_USE_EXT */
#endif /* _EXT_LLD_ISR_H_ */
#endif /* HAL_EXT_LLD_ISR_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _GPT_LLD_H_
#define _GPT_LLD_H_
#ifndef HAL_GPT_LLD_H
#define HAL_GPT_LLD_H
#if HAL_USE_GPT || defined(__DOXYGEN__)
@ -261,6 +261,6 @@ extern "C" {
#endif /* HAL_USE_GPT */
#endif /* _GPT_LLD_H_ */
#endif /* HAL_GPT_LLD_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _I2C_LLD_H_
#define _I2C_LLD_H_
#ifndef HAL_I2C_LLD_H
#define HAL_I2C_LLD_H
#if HAL_USE_I2C || defined(__DOXYGEN__)
@ -217,6 +217,6 @@ extern "C" {
#endif /* HAL_USE_I2C */
#endif /* _I2C_LLD_H_ */
#endif /* HAL_I2C_LLD_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _HAL_LLD_H_
#define _HAL_LLD_H_
#ifndef HAL_LLD_H
#define HAL_LLD_H
/*===========================================================================*/
/* Driver constants. */
@ -83,8 +83,8 @@
#include "nvic.h"
#define NRF51_LFCLK_FREQUENCY 32768
#define NRF51_HFCLK_FREQUENCY 16000000
#define NRF51_LFCLK_FREQUENCY 32768
#define NRF51_HFCLK_FREQUENCY 16000000
#ifdef __cplusplus
extern "C" {
@ -95,7 +95,7 @@ extern "C" {
}
#endif
#endif /* _HAL_LLD_H_ */
#endif /* HAL_LLD_H */
/**
* @}

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _PAL_LLD_H_
#define _PAL_LLD_H_
#ifndef HAL_PAL_LLD_H
#define HAL_PAL_LLD_H
#if (HAL_USE_PAL == TRUE) || defined(__DOXYGEN__)
@ -303,6 +303,6 @@ extern "C" {
#endif /* HAL_USE_PAL == TRUE */
#endif /* _PAL_LLD_H_ */
#endif /* HAL_PAL_LLD_H */
/** @} */

View File

@ -34,7 +34,7 @@
* @brief RNG default configuration.
*/
static const RNGConfig default_config = {
.digital_error_correction = 1,
.digital_error_correction = 1,
};
/*===========================================================================*/
@ -119,7 +119,7 @@ void rng_lld_stop(RNGDriver *rngp) {
* @notapi
*/
msg_t rng_lld_write(RNGDriver *rngp, uint8_t *buf, size_t n,
systime_t timeout) {
systime_t timeout) {
size_t i;
for (i = 0 ; i < n ; i++) {

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _RNG_LLD_H_
#define _RNG_LLD_H_
#ifndef HAL_RNG_LLD_H
#define HAL_RNG_LLD_H
#if (HAL_USE_RNG == TRUE) || defined(__DOXYGEN__)
@ -61,7 +61,7 @@
* @brief RNG1 interrupt priority level setting.
*/
#if !defined(NRF51_RNG_RNG1_IRQ_PRIORITY) || defined(__DOXYGEN__)
#define NRF51_RNG_RNG1_IRQ_PRIORITY 10
#define NRF51_RNG_RNG1_IRQ_PRIORITY 10
#endif
@ -151,13 +151,13 @@ extern "C" {
void rng_lld_start(RNGDriver *rngp);
void rng_lld_stop(RNGDriver *rngp);
msg_t rng_lld_write(RNGDriver *rngp, uint8_t *buf, size_t n,
systime_t timeout);
systime_t timeout);
#ifdef __cplusplus
}
#endif
#endif /* HAL_USE_RNG */
#endif /* _RNG_LLD_H_ */
#endif /* HAL_RNG_LLD_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _SERIAL_LLD_H_
#define _SERIAL_LLD_H_
#ifndef HAL_SERIAL_LLD_H
#define HAL_SERIAL_LLD_H
#if (HAL_USE_SERIAL == TRUE) || defined(__DOXYGEN__)
@ -145,6 +145,6 @@ extern "C" {
#endif /* HAL_USE_SERIAL == TRUE */
#endif /* _SERIAL_LLD_H_ */
#endif /* HAL_SERIAL_LLD_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _SPI_LLD_H_
#define _SPI_LLD_H_
#ifndef HAL_SPI_LLD_H
#define HAL_SPI_LLD_H
#if HAL_USE_SPI || defined(__DOXYGEN__)
@ -223,6 +223,6 @@ extern "C" {
#endif /* HAL_USE_SPI */
#endif /* _SPI_LLD_H_ */
#endif /* HAL_SPI_LLD_H */
/** @} */

View File

@ -24,8 +24,8 @@
* @{
*/
#ifndef _ST_LLD_H_
#define _ST_LLD_H_
#ifndef HAL_ST_LLD_H
#define HAL_ST_LLD_H
#include "halconf.h"
@ -266,6 +266,6 @@ static inline bool st_lld_is_alarm_active(void) {
#endif
}
#endif /* _ST_LLD_H_ */
#endif /* HAL_ST_LLD_H */
/** @} */

View File

@ -22,8 +22,8 @@
* @{
*/
#ifndef _WDG_LLD_H_
#define _WDG_LLD_H_
#ifndef HAL_WDG_LLD_H
#define HAL_WDG_LLD_H
#if (HAL_USE_WDG == TRUE) || defined(__DOXYGEN__)
@ -31,7 +31,7 @@
/* Driver constants. */
/*===========================================================================*/
#define WDG_MAX_TIMEOUT_MS \
#define WDG_MAX_TIMEOUT_MS \
((uint32_t)(0xFFFFFFFFu * 1000 / NRF51_LFCLK_FREQUENCY))
/*===========================================================================*/
@ -71,13 +71,13 @@ typedef struct WDGDriver WDGDriver;
* @note It could be empty on some architectures.
*/
typedef struct {
struct {
uint8_t pause_on_sleep : 1;
uint8_t pause_on_halt : 1;
} flags;
uint32_t timeout_ms;
struct {
uint8_t pause_on_sleep : 1;
uint8_t pause_on_halt : 1;
} flags;
uint32_t timeout_ms;
#if WDG_USE_TIMEOUT_CALLBACK == TRUE
void (*callback)(void);
void (*callback)(void);
#endif
} WDGConfig;
@ -122,6 +122,6 @@ extern "C" {
#endif /* HAL_USE_WDG == TRUE */
#endif /* _WDG_LLD_H_ */
#endif /* HAL_WDG_LLD_H */
/** @} */