Skip to content

Commit

Permalink
Standardize header guards
Browse files Browse the repository at this point in the history
  • Loading branch information
jcxldn committed Oct 1, 2023
1 parent d667836 commit db12223
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/core/mcp3008/hardware/mcp3008_hardware.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MCP3008_HARDWARE_H_
#define MCP3008_HARDWARE_H_
#ifndef HARDWARE_MCP3008_HARDWARE_H_
#define HARDWARE_MCP3008_HARDWARE_H_

#include "hardware/spi.h"

Expand All @@ -9,4 +9,4 @@
spi_dual_inst mcp3008_init_hardware(spi_inst_t *spi, uint baudrate, spi_pinout_t *pinout);
uint16_t mcp3008_internal_do_adc(spi_dual_inst *inst, uint8_t channel, bool differential);

#endif /* MCP3008_HARDWARE_H_ */
#endif /* HARDWARE_MCP3008_HARDWARE_H_ */
6 changes: 3 additions & 3 deletions src/core/mcp3008/mcp3008.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MCP3008_H_
#define MCP3008_H_
#ifndef MCP3008_MCP3008_H_
#define MCP3008_MCP3008_H_

#include "hardware/spi.h"
#include "pio/pio_spi.h"
Expand All @@ -19,4 +19,4 @@ typedef struct
bool isHw;
} spi_dual_inst;

#endif /* MCP3008_H_ */
#endif /* MCP3008_MCP3008_H_ */
6 changes: 3 additions & 3 deletions src/core/mcp3008/pinout.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef PINOUT_H_
#define PINOUT_H_
#ifndef MCP3008_PINOUT_H_
#define MCP3008_PINOUT_H_

typedef struct TU_ATTR_PACKED
{
Expand All @@ -9,4 +9,4 @@ typedef struct TU_ATTR_PACKED
int csn;
} spi_pinout_t;

#endif /* PINOUT_H_ */
#endif /* MCP3008_PINOUT_H_ */
6 changes: 3 additions & 3 deletions src/core/mcp3008/pio/mcp3008_pio.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MCP3008_PIO_H_
#define MCP3008_PIO_H_
#ifndef PIO_MCP3008_PIO_H_
#define PIO_MCP3008_PIO_H_

#include "pico/stdlib.h"
#include "pio_spi.h"
Expand All @@ -9,4 +9,4 @@
spi_dual_inst mcp3008_init_pio(PIO pio, uint baudrate, spi_pinout_t *pinout);
uint16_t mcp3008_read_pio(spi_dual_inst *inst, uint8_t channel, bool differential);

#endif /* MCP3008_PIO_H_ */
#endif /* PIO_MCP3008_PIO_H_ */
6 changes: 3 additions & 3 deletions src/core/mcp3008/pio/pio_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _PIO_SPI_H
#define _PIO_SPI_H
#ifndef PIO_PIO_SPI_H_
#define PIO_PIO_SPI_H_

#include "hardware/pio.h"
#include "spi.pio.h"
Expand All @@ -22,4 +22,4 @@ void pio_spi_read8_blocking(const pio_spi_inst_t *spi, uint8_t *dst, size_t len)

void pio_spi_write8_read8_blocking(const pio_spi_inst_t *spi, uint8_t *src, uint8_t *dst, size_t len);

#endif
#endif /* PIO_PIO_SPI_H_ */

0 comments on commit db12223

Please sign in to comment.