configs/nucleo-l432kc: Added Zero Cross sensor to nucleo-l432kc.
This commit is contained in:
parent
53e760d072
commit
752a7d249c
@ -80,6 +80,10 @@ ifeq ($(CONFIG_PWM),y)
|
|||||||
CSRCS += stm32_pwm.c
|
CSRCS += stm32_pwm.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_SENSORS_ZEROCROSS),y)
|
||||||
|
CSRCS += stm32_zerocross.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_TIMER),y)
|
ifeq ($(CONFIG_TIMER),y)
|
||||||
CSRCS += stm32_timer.c
|
CSRCS += stm32_timer.c
|
||||||
endif
|
endif
|
||||||
|
@ -110,6 +110,10 @@
|
|||||||
|
|
||||||
#define GPIO_INT1 (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN3)
|
#define GPIO_INT1 (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN3)
|
||||||
|
|
||||||
|
/* ZERO CROSS pin definition */
|
||||||
|
|
||||||
|
#define GPIO_ZEROCROSS (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN0)
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
@ -231,6 +235,18 @@ int stm32_ina226initialize(FAR const char *devpath);
|
|||||||
int stm32_ina219initialize(FAR const char *devpath);
|
int stm32_ina219initialize(FAR const char *devpath);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: stm32_zerocross_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Initialize and register the zero cross driver
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_SENSORS_ZEROCROSS
|
||||||
|
int stm32_zerocross_initialize(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: board_timer_driver_initialize
|
* Name: board_timer_driver_initialize
|
||||||
*
|
*
|
||||||
|
@ -274,6 +274,17 @@ int board_app_initialize(uintptr_t arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SENSORS_ZEROCROSS
|
||||||
|
/* Configure the zero-crossing driver */
|
||||||
|
|
||||||
|
ret = stm32_zerocross_initialize();
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "Failed to initialize Zero-Cross, error %d\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_TIMER
|
#ifdef CONFIG_TIMER
|
||||||
/* Initialize and register the timer driver */
|
/* Initialize and register the timer driver */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user