mirror of
https://github.com/preble/libpinproc
synced 2026-02-24 18:25:23 +01:00
Added include guards
This commit is contained in:
@@ -22,8 +22,11 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _PRCOMMON_H_
|
||||
#define _PRCOMMON_H_
|
||||
#ifndef PINPROC_PRCOMMON_H
|
||||
#define PINPROC_PRCOMMON_H
|
||||
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
# define DEBUG(block)
|
||||
@@ -34,4 +37,4 @@
|
||||
void PRLog(PRLogLevel level, const char *format, ...);
|
||||
void PRSetLastErrorText(const char *format, ...);
|
||||
|
||||
#endif // _PRCOMMON_H_
|
||||
#endif /* PINPROC_PRCOMMON_H */
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
* PRDevice.h
|
||||
* libpinproc
|
||||
*/
|
||||
#ifndef PINPROC_PRDEVICE_H
|
||||
#define PINPROC_PRDEVICE_H
|
||||
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "pinproc.h"
|
||||
#include "PRCommon.h"
|
||||
@@ -167,3 +172,5 @@ protected:
|
||||
queue<uint32_t> freeSwitchRuleIndexes; /**< Indexes of available switch rules. */
|
||||
PRSwitchRuleInternal *GetSwitchRuleByIndex(uint16_t index);
|
||||
};
|
||||
|
||||
#endif /* PINPROC_PRDEVICE_H */
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _PROC_HARDWARE_H_
|
||||
#define _PROC_HARDWARE_H_
|
||||
#ifndef PINPROC_PRHARDWARE_H
|
||||
#define PINPROC_PRHARDWARE_H
|
||||
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "pinproc.h"
|
||||
@@ -244,7 +247,7 @@ typedef struct PRSwitchRuleInternal {
|
||||
} PRSwitchRuleInternal;
|
||||
|
||||
|
||||
bool_t IsStern (uint32_t hardware_data);
|
||||
bool_t IsStern (uint32_t hardware_data);
|
||||
uint32_t CreateRegRequestWord( uint32_t select, uint32_t addr, uint32_t num_words);
|
||||
uint32_t CreateBurstCommand ( uint32_t select, uint32_t addr, uint32_t num_words);
|
||||
int32_t CreateManagerUpdateConfigBurst ( uint32_t * burst, PRManagerConfig *manager_config);
|
||||
@@ -274,4 +277,4 @@ void PRHardwareClose();
|
||||
int PRHardwareRead(uint8_t *buffer, int maxBytes);
|
||||
int PRHardwareWrite(uint8_t *buffer, int bytes);
|
||||
|
||||
#endif // _PROC_HARDWARE_H_
|
||||
#endif /* PINPROC_PRHARDWARE_H */
|
||||
|
||||
Reference in New Issue
Block a user