[COMP] Fixing headers, missing includes.
This commit is contained in:
parent
86428716d5
commit
7059c87ab4
|
@ -71,6 +71,10 @@
|
|||
#define HAL_USE_USB_MSD FALSE
|
||||
#endif
|
||||
|
||||
#if !defined(HAL_USE_COMP)
|
||||
#define HAL_USE_COMP FALSE
|
||||
#endif
|
||||
|
||||
/* Abstract interfaces.*/
|
||||
|
||||
/* Shared headers.*/
|
||||
|
@ -82,6 +86,7 @@
|
|||
#include "hal_usbh.h"
|
||||
#include "hal_timcap.h"
|
||||
#include "hal_qei.h"
|
||||
#include "hal_comp.h"
|
||||
|
||||
/* Complex drivers.*/
|
||||
#include "hal_onewire.h"
|
||||
|
|
|
@ -50,13 +50,12 @@ typedef enum {
|
|||
} compstate_t;
|
||||
|
||||
/**
|
||||
* @brief Type of a structure representing an TIMCAP driver.
|
||||
* @brief Type of a structure representing an COMP driver.
|
||||
*/
|
||||
typedef struct COMPDriver COMPDriver;
|
||||
|
||||
|
||||
/**
|
||||
* @brief TIMCAP notification callback type.
|
||||
* @brief COMP notification callback type.
|
||||
*
|
||||
* @param[in] comp pointer to a @p COMPDriver object
|
||||
*/
|
||||
|
@ -79,7 +78,7 @@ typedef void (*compcallback_t)(COMPDriver *comp);
|
|||
*
|
||||
* @iclass
|
||||
*/
|
||||
#define timcapEnableI(comp) comp_lld_enable(comp)
|
||||
#define compEnableI(comp) comp_lld_enable(comp)
|
||||
|
||||
/**
|
||||
* @brief Disables the input capture.
|
||||
|
@ -88,7 +87,7 @@ typedef void (*compcallback_t)(COMPDriver *comp);
|
|||
*
|
||||
* @iclass
|
||||
*/
|
||||
#define timcapDisableI(comp) comp_lld_disable(comp)
|
||||
#define compDisableI(comp) comp_lld_disable(comp)
|
||||
/** @} */
|
||||
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ typedef struct {
|
|||
} COMPConfig;
|
||||
|
||||
/**
|
||||
* @brief Structure representing an TIMCAP driver.
|
||||
* @brief Structure representing an COMP driver.
|
||||
*/
|
||||
struct COMPDriver {
|
||||
/**
|
||||
|
@ -299,10 +299,10 @@ extern COMPDriver COMPD7;
|
|||
extern "C" {
|
||||
#endif
|
||||
void comp_lld_init(void);
|
||||
void comp_lld_start(COMPDriver *timcapp);
|
||||
void comp_lld_stop(COMPDriver *timcapp);
|
||||
void comp_lld_enable(COMPDriver *timcapp);
|
||||
void comp_lld_disable(COMPDriver *timcapp);
|
||||
void comp_lld_start(COMPDriver *compp);
|
||||
void comp_lld_stop(COMPDriver *compp);
|
||||
void comp_lld_enable(COMPDriver *compp);
|
||||
void comp_lld_disable(COMPDriver *compp);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -45,6 +45,18 @@ static const EXTConfig extcfg = {
|
|||
}
|
||||
};
|
||||
|
||||
static const COMPConfig comp2_conf = {
|
||||
COMP_OUTPUT_NORMAL,
|
||||
NULL,
|
||||
0
|
||||
};
|
||||
|
||||
static const COMPConfig comp4_conf = {
|
||||
COMP_OUTPUT_INVERTED,
|
||||
NULL,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Application entry point.
|
||||
|
@ -55,7 +67,8 @@ int main(void) {
|
|||
chSysInit();
|
||||
|
||||
extStart(&EXTD1, &extcfg);
|
||||
//compStart(&COMPD2, &comp2_conf);
|
||||
compStart(&COMPD2, &comp2_conf);
|
||||
compStart(&COMPD4, &comp4_conf);
|
||||
|
||||
/*
|
||||
* Normal main() thread activity, it resets the watchdog.
|
||||
|
|
Loading…
Reference in New Issue