云台底层控制写完,未测试
This commit is contained in:
parent
73d440be4d
commit
7d46287def
9 changed files with 2079 additions and 1766 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* config.h - 配置整个工程
|
||||
*
|
||||
*/
|
||||
|
|
@ -12,36 +12,37 @@
|
|||
/*
|
||||
* 模拟定时器使用的定时器
|
||||
*/
|
||||
#define SIMULAT_TIMER_PITX PIT1
|
||||
#define SIMULAT_TIMER_PITX PIT1
|
||||
|
||||
|
||||
/*
|
||||
* 8266
|
||||
* µ÷ÊÔÄ£¿é,»ò8266
|
||||
*/
|
||||
#define WIFI_UARTX UART0 // PTA1,PTA2
|
||||
#define DEBUG_UARTX UART0 // PTA1,PTA2
|
||||
|
||||
/*
|
||||
* µ÷ÊÔÄ£¿é,»òÔÆÌ¨
|
||||
* ÔÆÌ¨
|
||||
*/
|
||||
#define DEBUG_UARTX UART1 // PTC3,PTC4
|
||||
|
||||
#define ORIENT_UARTX UART1 // PTC3,PTC4
|
||||
#define RE_DE_PINX PTC1
|
||||
|
||||
/*
|
||||
* 输入模块
|
||||
*/
|
||||
#define UP_KEY_PINX PTE20
|
||||
#define DOWN_KEY_PINX PTA17
|
||||
#define OK_KEY_PINX PTE23
|
||||
#define RET_KEY_PINX PTA4
|
||||
#define AMS_KEY_PINX PTA5
|
||||
#define UP_KEY_PINX PTA4
|
||||
#define DOWN_KEY_PINX PTA5
|
||||
#define OK_KEY_PINX PTE20
|
||||
#define RET_KEY_PINX PTE30
|
||||
#define AMS_KEY_PINX PTD5
|
||||
#define WIFI_KEY_PINX PTD7
|
||||
#define MR_KEY_PINX PTE30
|
||||
#define MR_KEY_PINX PTE23
|
||||
#define MB_KEY_PINX PTA16
|
||||
#define MUVB_KEY_PINX PTD6
|
||||
#define MUVB_KEY_PINX PTD4
|
||||
// knob用必须是PTA或PTD端口的
|
||||
#define KNOB_A_PINX PTD6
|
||||
#define KNOB_B_PINX PTD7
|
||||
#define KNOB_KEY_PINX PTD4
|
||||
#define KNOB_A_PINX PTD7
|
||||
#define KNOB_B_PINX PTD6
|
||||
#define KNOB_KEY_PINX PTE20
|
||||
|
||||
|
||||
|
||||
|
|
@ -56,19 +57,21 @@
|
|||
*/
|
||||
#define DS1302_CE_PINX PTB2
|
||||
#define DS1302_CLK_PINX PTB1
|
||||
#define DS1302_IO_PINX PTB0
|
||||
#define DS1302_IO_PINX PTB3
|
||||
|
||||
/*
|
||||
* 控制执行模块
|
||||
*
|
||||
*/
|
||||
#define LGRED_PINX PTC12
|
||||
#define LGBLUE_PINX PTC13
|
||||
#define LGUVB_PINX PTC15
|
||||
#define WATER_PINX PTC16
|
||||
#define LGRED_PINX PTC17
|
||||
#define LGBLUE_PINX PTC16
|
||||
#define LGUVB_PINX PTC13
|
||||
#define WATER_PINX PTD1
|
||||
|
||||
/*
|
||||
* led控制,多选几个任意端口
|
||||
*/
|
||||
|
||||
#define LG1_PINX PTC9
|
||||
#define LG2_PINX PTC8
|
||||
#define LG3_PINX PTC7
|
||||
#endif // CONFIG_H
|
||||
|
|
|
|||
51
plan_manage_main/src/app/include/orient.h
Normal file
51
plan_manage_main/src/app/include/orient.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* orient.h - 方向控制
|
||||
*
|
||||
* 所有如上,所有如下
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ORIENT_H
|
||||
#define ORIENT_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum orient_
|
||||
{
|
||||
ORIENT_UP = 0, ORIENT_DOWN, ORIENT_RIGHT, ORIENT_LEFT
|
||||
} orient;
|
||||
|
||||
typedef enum preset_op_
|
||||
{
|
||||
PRESET_SET = 0, PRESET_CLEAR, PRESET_CALL
|
||||
} preset_op;
|
||||
|
||||
typedef enum orient_mode_
|
||||
{
|
||||
MODE_AUTO = 0, MODE_MANUL
|
||||
} orient_mode;
|
||||
|
||||
|
||||
|
||||
void orient_init(void);
|
||||
|
||||
void orient_setspeed(uint8_t addr, orient ori, uint8_t spd);
|
||||
|
||||
void orient_setpreset(uint8_t addr, preset_op op, uint8_t npre);
|
||||
|
||||
void orient_setmode(uint8_t addr, orient_mode mod);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* ORIENT_H */
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue