asuro.h介绍
来源:互联网 发布:python自动化股票交易 编辑:程序博客网 时间:2024/05/20 04:48
asuro本身带了些函数库,初次实用asuro可以从这些现成的函数入手。
这些基本函数的声明都在asuro.h中,如下:
这些函数的实现全部在asuro.c中。
这些基本函数的声明都在asuro.h中,如下:
- /* Init function Processor will be initalized to work correctly */
- /*这个函数会使处理器复位到设定的初始状态,必须在程序的开头处调用。如果不调用这个函数,处理器甚至不会与PC终端进行通讯。*/
- void Init(void);
- /* Set Status LED (OFF,GREEN,RED,YELLOW)*/
- /* example code set Status LED GREEN */
- /* StatusLED(GREEN); */
- /*可以通过此函数实现状态LED(D12)的开或关,可用参数OFF,GREEN,RED,YELLOW*/
- inline void StatusLED(unsigned char color);
- /* function for front LED */
- /* example code front LED On */
- /* FrontLED(ON); */
- /*控制前置LED(D11),参数:ON与OFF*/
- inline void FrontLED(unsigned char status);
- /* function for Back LEDs */
- /* example code right LED On left LED Off */
- /* BackLED(OFF,ON); */
- /*后置LED(D15、D16),参数:ON、OFF。参数1表示左,参数2表示右*/
- void BackLED(unsigned char left, unsigned char right);
- /* Set motor direction (FWD,RWD,BREAK,FREE)*/
- /* example code set Direction for right motor to rewind */
- /* MotorDir(BREAK,RWD); */
- /*控制两个马达的方向,需要在对马达进行速度控制之前调用它。参数:FWD(前)、RWD(后退)、BREAK(减速或突然停止)、FREE(放开控制)*/
- inline void MotorDir(unsigned char left_dir, unsigned char right_dir);
- /* range for motor speed 0..255 */
- /* example code set speed for left motor to 150 */
- /* MotorSpeed(150,0); */
- /*供给马达的电能,表示速度,0-255,达到60开始运转*/
- inline void MotorSpeed(unsigned char left_speed, unsigned char right_speed);
- /* function for serial communication */
- void SerWrite(unsigned char *data,unsigned char length);
- /* timeout = 0 => bloking mode !!! */
- void SerRead(unsigned char *data, unsigned char length, unsigned int timeout);
- /* function to read out line follow phototransistors (left,rigth) */
- /*将底部光感器(T9、T10)的强度读到参数中(通常参数是长2的整形数组),强度范围0-1023*/
- void LineData(unsigned int *data);
- /* function to read out odometrie phototransistors (left,rigth) */
- /*点亮LED(D13、D14),将T11、T12的值存到data数组中*/
- void OdometrieData(unsigned int *data);
- /* function to read out switches */
- /*扫描触碰开关的状态,返回1个字节。K6-K1分别对应第0位到第5位*/
- unsigned char PollSwitch (void);
- /* for working with Interrupt */
- void StartSwitch(void);
- void StopSwitch(void);
- /* Sleep function using 36kHz counter */
- /*处理器等待.单位为72khz,即1/72000秒*/
- void Sleep(unsigned char timer36kHz);
- /* ----------- END ------------ */
- asuro.h介绍
- H+介绍
- 建好了asuro的软硬件环境
- H.263介绍
- H.263介绍
- stdio.h文件介绍
- stdlib.h文件介绍
- string.h文件介绍
- string.h函数介绍
- H.265介绍
- H.264专利介绍
- HEVC (H.265)介绍
- assert.h使用介绍
- time.h 详细介绍
- C函数库介绍: string.h、mem.h
- C函数库介绍: string.h、mem.h
- C函数库介绍:dos.h、alloc.h、malloc.h、stdlib.h、process.h
- ·H.248协议介绍
- SQL Server数据库连接查询的种类及其应用
- 分隔视图与TreeView的显示和控制
- wince的CSplashWnd
- 文件批量重命名 Win XP自己就可以搞定
- 深入探讨MFC消息循环和消息泵
- asuro.h介绍
- 如何解决Windows XP SP3安装失败问题
- mapl
- 提高IIS服务器的执行效率
- 优化网站性能 提高网站速度访问速度的14条实践
- 教你两招巧妙隐藏需保密文件
- C++多态技术---静态多态和动态多态
- 另类提取Word中图片的方法
- 端口截听实现端口隐藏,嗅叹与攻击(端口复用)