Compare commits
No commits in common. "c93df0226294ea189d02fcb2f70dabc3ae0f40f7" and "2b2747fef797fd3eecb0f08ae8be61969e6d7d91" have entirely different histories.
c93df02262
...
2b2747fef7
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,5 +4,4 @@ MdkV5/Objects/*
|
|||||||
MdkV5/*.uvoptx
|
MdkV5/*.uvoptx
|
||||||
MdkV5/EventRecorderStub.scvd
|
MdkV5/EventRecorderStub.scvd
|
||||||
MdkV5/*\.uvguix*
|
MdkV5/*\.uvguix*
|
||||||
Ses/Output/*
|
Ses/Output/*
|
||||||
**.emSession
|
|
@ -9,9 +9,6 @@
|
|||||||
#define NVIC_GROUP_LEVEL NVIC_PriorityGroup_2
|
#define NVIC_GROUP_LEVEL NVIC_PriorityGroup_2
|
||||||
/* **********END********** */
|
/* **********END********** */
|
||||||
|
|
||||||
/* 使用OS,ThreadX */
|
|
||||||
#define USE_THREADX
|
|
||||||
|
|
||||||
/* **********SystemClock相关********** */
|
/* **********SystemClock相关********** */
|
||||||
// GPIO
|
// GPIO
|
||||||
#define GPIO_ENABLE
|
#define GPIO_ENABLE
|
||||||
@ -36,17 +33,17 @@
|
|||||||
// 数字输出
|
// 数字输出
|
||||||
#undef USE_DIGITAL_OUTPUT
|
#undef USE_DIGITAL_OUTPUT
|
||||||
#ifdef USE_DIGITAL_OUTPUT
|
#ifdef USE_DIGITAL_OUTPUT
|
||||||
#define DO_NUM 2
|
#define DO_NUM 2
|
||||||
#define DO1 0
|
#define DO1 0
|
||||||
#define DO2 1
|
#define DO2 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// 数字输入
|
// 数字输入
|
||||||
#undef USE_DIGITAL_INPUT
|
#undef USE_DIGITAL_INPUT
|
||||||
#ifdef USE_DIGITAL_INPUT
|
#ifdef USE_DIGITAL_INPUT
|
||||||
#define DI_NUM 2
|
#define DI_NUM 2
|
||||||
#define DI1 0
|
#define DI1 0
|
||||||
#define DI2 1
|
#define DI2 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// LED灯
|
// LED灯
|
||||||
@ -61,44 +58,44 @@
|
|||||||
|
|
||||||
/* **********串口相关********** */
|
/* **********串口相关********** */
|
||||||
#ifdef USE_USART1
|
#ifdef USE_USART1
|
||||||
#define COM0 USART1_BASE
|
#define COM0 USART1_BASE
|
||||||
#define COM0_IRQN USART1_IRQn
|
#define COM0_IRQN USART1_IRQn
|
||||||
#define COM0_TX_PORT GPIOA
|
#define COM0_TX_PORT GPIOA
|
||||||
#define COM0_RX_PORT GPIOA
|
#define COM0_RX_PORT GPIOA
|
||||||
#define COM0_TX_PIN GPIO_Pin_9
|
#define COM0_TX_PIN GPIO_Pin_9
|
||||||
#define COM0_RX_PIN GPIO_Pin_10
|
#define COM0_RX_PIN GPIO_Pin_10
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_USART2
|
#ifdef USE_USART2
|
||||||
#define COM1 USART2_BASE
|
#define COM1 USART2_BASE
|
||||||
#define COM1_IRQN USART2_IRQn
|
#define COM1_IRQN USART2_IRQn
|
||||||
#define COM1_TX_PORT GPIOA
|
#define COM1_TX_PORT GPIOA
|
||||||
#define COM1_RX_PORT GPIOA
|
#define COM1_RX_PORT GPIOA
|
||||||
#define COM1_TX_PIN GPIO_Pin_2
|
#define COM1_TX_PIN GPIO_Pin_2
|
||||||
#define COM1_RX_PIN GPIO_Pin_3
|
#define COM1_RX_PIN GPIO_Pin_3
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_USART3
|
#ifdef USE_USART3
|
||||||
#define COM2 USART3_BASE
|
#define COM2 USART3_BASE
|
||||||
#define COM2_IRQN USART3_IRQn
|
#define COM2_IRQN USART3_IRQn
|
||||||
#define COM2_TX_PORT GPIOB
|
#define COM2_TX_PORT GPIOB
|
||||||
#define COM2_RX_PORT GPIOB
|
#define COM2_RX_PORT GPIOB
|
||||||
#define COM2_TX_PIN GPIO_Pin_10
|
#define COM2_TX_PIN GPIO_Pin_10
|
||||||
#define COM2_RX_PIN GPIO_Pin_11
|
#define COM2_RX_PIN GPIO_Pin_11
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_USART4
|
#ifdef USE_USART4
|
||||||
#define COM3 UART4_BASE
|
#define COM3 UART4_BASE
|
||||||
#define COM3_IRQN UART4_IRQn
|
#define COM3_IRQN UART4_IRQn
|
||||||
#define COM3_TX_PORT GPIOC
|
#define COM3_TX_PORT GPIOC
|
||||||
#define COM3_RX_PORT GPIOC
|
#define COM3_RX_PORT GPIOC
|
||||||
#define COM3_TX_PIN GPIO_Pin_10
|
#define COM3_TX_PIN GPIO_Pin_10
|
||||||
#define COM3_RX_PIN GPIO_Pin_11
|
#define COM3_RX_PIN GPIO_Pin_11
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_USART5
|
#ifdef USE_USART5
|
||||||
#define COM4 UART5_BASE
|
#define COM4 UART5_BASE
|
||||||
#define COM4_IRQN UART5_IRQn
|
#define COM4_IRQN UART5_IRQn
|
||||||
#define COM4_TX_PORT GPIOB
|
#define COM4_TX_PORT GPIOB
|
||||||
#define COM4_RX_PORT GPIOD
|
#define COM4_RX_PORT GPIOD
|
||||||
#define COM4_TX_PIN GPIO_Pin_12
|
#define COM4_TX_PIN GPIO_Pin_12
|
||||||
#define COM4_RX_PIN GPIO_Pin_2
|
#define COM4_RX_PIN GPIO_Pin_2
|
||||||
#endif
|
#endif
|
||||||
/* LetterShell */
|
/* LetterShell */
|
||||||
#define USE_SHELL
|
#define USE_SHELL
|
||||||
|
@ -42,8 +42,6 @@ void LedCtlTask(ULONG ThreadXInput)
|
|||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
IoCtlLedToggle(LED0);
|
|
||||||
IoCtlLedToggle(LED1);
|
|
||||||
IoCtlLedToggle(LED2);
|
IoCtlLedToggle(LED2);
|
||||||
tx_thread_sleep(100);
|
tx_thread_sleep(100);
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* @note 此函数应该将所有OS相关的初始化放到这里
|
* @note 此函数应该将所有OS相关的初始化放到这里
|
||||||
* @example void
|
* @example void
|
||||||
*/
|
*/
|
||||||
void ThreadXTaskInit(void* FirstUnusedMemory)
|
void tx_application_define(void* FirstUnusedMemory)
|
||||||
{
|
{
|
||||||
/* 优先级31,抢占10 */
|
/* 优先级31,抢占10 */
|
||||||
LedCtlTaskInit(31,10);
|
LedCtlTaskInit(31,10);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user