资源简介
这是我问德国ACAM公司要的PCAP01的芯片编程代码,真心好用
代码片段和文件信息
/******************* (C) COPYRIGHT 2012 acam messelectronic GmbH ***************
******************** (C) COPYRIGHT 2008 STMicroelectronics *********************
* File Name : main.c
* Author : acam Support Team
* Version :
* Date : 24-10-2012
* Description : Simple demonstration program to run PCap01/ SPI/ Slot_1
*******************************************************************************
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH AN EXAMPLE CODING INFORMATION REGARDING OUR PRODUCTS. THE ACAM
* RECOMMENDATIONS ARE BELIEVED USEFUL AND OPERABLE NEVERTHELESS IT IS OF THE
* CUSTOMER‘S SOLE RESPONSIBILITY TO MODIFY TEST AND VALIDATE THEM BEFORE
* SETTING UP ANY PRODUCTION PROCESS. AS A RESULT ACAM SHALL NOT BE HELD LIABLE
* FOR ANY DIRECT INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS
* ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF
* THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
******************************************************************************/
/* Includes ------------------------------------------------------------------*/
#include “stm32f10x.h“
typedef enum {FALSE = 0 TRUE = !FALSE} bool;
int n;
void *Bus_Type=SPI1;
/* Private variables ---------------------------------------------------------*/
#define LOOP_DLY_100US 2000
#define LOOP_DLY_250ns 2
#define NUMBER_OF_SAMPLES 100
#define FOUR_MILLISECONDS_TIMEOUT 4300
#define TWENTY_MILLISECONDS_TIMEOUT 20300
uint32_t CriticalSecCntr;
bool configured_true = FALSE;
uint8_t Rx_data1;
uint8_t Rx_data2;
uint8_t Rx_data3;
float *sram_float_memory = ((float *)(SRAM_base + 0xB00));
uint32_t *sram_uint32_t_memory = ((uint32_t *)(SRAM_base + 0xB00));
uint32_t sram_mem_offset = 0x0;
uint32_t Dummy_var = 0;
/* PCap01 Standard Config (Reg = 0xC0 .. 0xD4) -------------------------------*/
uint32_t PCap01_standard_config_reg[] = {
0x4200FF // Config Register 0
0x201022 // Config Register 1
0xFF1E0B // Config Register 2
0x0D0064 // Config Register 3
0x080000 // Config Register 4
0x000000 // Config Register 5
0x000040 // Config Register 6
0x1F0000 // Config Register 7
0x800030 // Config Register 8
0xFF000F // Config Register 9
0x180087 // Config Register 10
0x000000 // Config Register 11
0x000000 // Config Register 12
0x000000 // Config Register 13
0x000000 // Config Register 14
0x000000 // Config Register 15
0x000000 // Config Register 16
0x000000 // Config Register 17
0x000000 // Config Register 18
0x000000 // Config Register 19
0x000001}; // Config Register 20
/*
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 41783 2019-06-26 18:32 PCAP01_SPI_main.c
- 上一篇:天猫淘宝运营计划
- 下一篇:FDC2214模块接线说明.txt
评论
共有 条评论