没有合适的资源?快使用搜索试试~ 我知道了~
adns9500芯片驱动
3星 · 超过75%的资源 需积分: 18 19 下载量 47 浏览量
2013-09-10
14:59:17
上传
评论
收藏 13KB TXT 举报
温馨提示
试读
16页
基于fpga的adns9500的芯片驱动
资源推荐
资源详情
资源评论
/*
* Copyright RobOtter (2009)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/** @file adns9500.c
* @author JD
*
* Drive RobOtter ADNS9500 FPGA system.
*/
#include <aversive.h>
#include <aversive/error.h>
#include <aversive/wait.h>
#include <util/delay.h>
#include "adns9500.h"
* Copyright RobOtter (2009)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/** @file adns9500.c
* @author JD
*
* Drive RobOtter ADNS9500 FPGA system.
*/
#include <aversive.h>
#include <aversive/error.h>
#include <aversive/wait.h>
#include <util/delay.h>
#include "adns9500.h"
#include "adns9500_spi.h"
#include "adns9500_spi_registers.h"
#include "adns9500_firmware2.h"
void adns9500_init()
{
// Initialize SPI
adns9500_spi_init();
// Default configuration
ADNS9500_LOCK = 0;
ADNS9500_ENABLE = 0;
}
void adns9500_boot(adns9500_configuration_t* config)
{
uint8_t byte,hbyte,lbyte,lpcfg;
uint8_t adns_i;
// Wait OP + IN-RST for ADNS GO
_delay_us(ADNS9500_TIMINGS_OP + ADNS9500_TIMINGS_INRST);
// For each ADNS
for(adns_i=1;adns_i<=ADNS9500_NUM;adns_i++)
{
//------------------------------------------------
// Perform reset on current ADNS
//------------------------------------------------
#include "adns9500_spi_registers.h"
#include "adns9500_firmware2.h"
void adns9500_init()
{
// Initialize SPI
adns9500_spi_init();
// Default configuration
ADNS9500_LOCK = 0;
ADNS9500_ENABLE = 0;
}
void adns9500_boot(adns9500_configuration_t* config)
{
uint8_t byte,hbyte,lbyte,lpcfg;
uint8_t adns_i;
// Wait OP + IN-RST for ADNS GO
_delay_us(ADNS9500_TIMINGS_OP + ADNS9500_TIMINGS_INRST);
// For each ADNS
for(adns_i=1;adns_i<=ADNS9500_NUM;adns_i++)
{
//------------------------------------------------
// Perform reset on current ADNS
//------------------------------------------------
剩余15页未读,继续阅读
资源评论
- qq_300475212016-09-14资源不全面,仅有一个c文件。
wangzitc333
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功