Additional encoder for F7 and added functions for TimerHook for F745 and H745 and H743
This commit is contained in:
parent
1de538282e
commit
f5df946676
@ -134,6 +134,8 @@ CONFIG_STM32F7_TIM3=y
|
||||
CONFIG_STM32F7_TIM3_QE=y
|
||||
CONFIG_STM32F7_TIM4=y
|
||||
CONFIG_STM32F7_TIM4_QE=y
|
||||
CONFIG_STM32F7_TIM8=y
|
||||
CONFIG_STM32F7_TIM8_QE=y
|
||||
CONFIG_STM32F7_USART_BREAKS=y
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
|
@ -367,6 +367,9 @@
|
||||
#define GPIO_TIM4_CH1IN (GPIO_TIM4_CH1IN_2|GPIO_SPEED_50MHz)
|
||||
#define GPIO_TIM4_CH2IN (GPIO_TIM4_CH2IN_2|GPIO_SPEED_50MHz)
|
||||
|
||||
#define GPIO_TIM8_CH1IN (GPIO_TIM8_CH1IN_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_TIM8_CH2IN (GPIO_TIM8_CH2IN_1|GPIO_SPEED_50MHz)
|
||||
|
||||
/* PWM
|
||||
* Use Timer 1 or 3
|
||||
*/
|
||||
|
@ -42,6 +42,10 @@
|
||||
#include "stm32_romfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYSTEMTICK_HOOK
|
||||
#include <semaphore.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -209,6 +213,18 @@ int stm32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_TIM8_QE
|
||||
snprintf(buf, sizeof(buf), "/dev/qe4");
|
||||
ret = stm32_qencoder_initialize(buf, 8);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to register the qencoder: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_CAN_CHARDRIVER
|
||||
@ -265,3 +281,13 @@ int stm32_bringup(void)
|
||||
UNUSED(ret);
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSTEMTICK_HOOK
|
||||
|
||||
sem_t g_waitsem;
|
||||
|
||||
void board_timerhook(void)
|
||||
{
|
||||
(void)sem_post(&g_waitsem);
|
||||
}
|
||||
#endif
|
||||
|
@ -41,6 +41,10 @@
|
||||
#include "stm32_fdcan_sock.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYSTEMTICK_HOOK
|
||||
#include <semaphore.h>
|
||||
#endif
|
||||
|
||||
#include "nucleo-h743zi2.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -258,3 +262,13 @@ int stm32_bringup(void)
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSTEMTICK_HOOK
|
||||
|
||||
sem_t g_waitsem;
|
||||
|
||||
void board_timerhook(void)
|
||||
{
|
||||
(void)sem_post(&g_waitsem);
|
||||
}
|
||||
#endif
|
||||
|
@ -39,6 +39,10 @@
|
||||
# include <nuttx/serial/uart_rpmsg.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYSTEMTICK_HOOK
|
||||
#include <semaphore.h>
|
||||
#endif
|
||||
|
||||
#include "nucleo-h745zi.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -227,3 +231,13 @@ int stm32_bringup(void)
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSTEMTICK_HOOK
|
||||
|
||||
sem_t g_waitsem;
|
||||
|
||||
void board_timerhook(void)
|
||||
{
|
||||
(void)sem_post(&g_waitsem);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user