pin_map.c


#include "PIXCIR_algorithm.h"

/*******************************************/
/* PIXCIR AG, Switzerland                  */
/*******************************************/

//#define XN  14
//#define YN  25
#define XN  25
#define YN  14


//       +----------------- set to 1
//                   |+---------------- set to 1
//                   ||+--------------- set to 1
//                   |||+-------------- set to 0
//                   ||||+------------- Cr2
//                  |||||+------------ Cr1
//                    ||||||+----------- -
//                    |||||||+---------- GF
//             ||||||||+--------- PL
//                   |||||||||+-------- Cs2
//                     ||||||||||+------- Cs1
//                   |||||||||||+------ NT
//                                  ||||||||||||+----- RG
//                  |||||||||||||+---- G1
//                    ||||||||||||||+--- G0
//                    |||||||||||||||+-- NP
//                                        ||||||||||||||||
#define X_SETUP_COMMAND     0b1110000010011100
#define Y_SETUP_COMMAND     0b1110000010011100


asm(" .section  User_data_NE,ROMDATA");
asm(" .ORG  03000H");
#pragma section  rom User_data
static const eeprom_t UserData =
{
    {
  //disto =
     0,  4,  8,     12,  16,
     20,  24,  28,  32,  36,
     40,  44,  48,  52,     56,
     60,  64,  68,  72,  76,
     80,  84,  88,  92,  96,
     100,    104,    108,    112,    116,
     120,    124
    },
 
    {
  //x.table =
        {
         //45, 44,
         //43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,
         21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45
        },
        //x.nbr =
        XN,
        //x.reserved =
        0,
        //x.stamp =
        {
         0b0101010101010101, 0b0101010101010101, 
   0b0101010101010101, 0b0101010101010101, 
         0b0101010101010101, 0b0101010101010101
//   0b0101000000000000, 0b0000000000000000, 
//   0b0000000000000000, 0b0000000001010101, 
//         0b0101010101010101, 0b0101010101010101
        },
  //x.sensitivity =
        {0},
  //x.setup =
     X_SETUP_COMMAND,
  //x.thr =
     45,
    },
 
    {
  //y.table =
        {
         //19,18,17,16,15,14,13,12,11,10,9,8,7,6,//5,
         6,7,8,9,10,11,12,13,14,15,16,17,18,19
        },
        //y.nbr =
        YN,
        //y.reserved =
        0,
        //y.stamp =
        {
         0b0101010101010101, 0b0101010101010101, 
   0b0101010101010101, 0b0101010101010101, 
         0b0101010101010101, 0b0101010101010101
//   0b0101010101010101, 0b0101010101010101, 
//   0b0101010101010101, 0b0101010000000000, 
//         0b0000000000000000, 0b0000010101010101
        },
  //y.sensitivity =
        {0},
  //y.setup =
     Y_SETUP_COMMAND,
  //y.thr =
        45,
    },

    {
        //.options.M0_spi =
        0x11,
        //.options.M1_spi =
        1,
        //.options.scan_en =
        1,
        //.options.version =
        { 0x1, 0x2, 0x3, 0x4 },
        //.options.X_res =
        800,
        //.options.Y_res =
        480,
        //.options.move_thr =
        8,
        //.options.ghost_thr =
        50,
        //.options.fast =
        2,
        //.options.special_borders =
        0,
        //.options.Z_thr =
        10,
        //.options.power_mode =
  (5<<4)|(1<<2),
        //0,       // Active mode, Allow Sleep OFF
        //.options.INT_mode =
        0b00001010,      // INT enabled, high active, periodical assert mode
        //.options.INT_width =
        100,
        //.options.drift_comp =
        0,
        //.options.subversion =
        0, 
   //noise_thr;
   15,
  //noise_delay;
  2,
  //noise_mode;   
  1,    
        //.options.I2C_timeout =
        2,    // Set timeout feature ON, reset only the I2C hardware
        //.options.I2C_timeout_period =
        4,               //200ms[timeout period = (I2C_timeout_period * 50) ms
        //.options.interval =
        1,
  //extra_offset;
  0,
  //extra_offset_flag;
  0,
  //extra_offset_out[4];
     {0},
  //extra_offset_in[4];
     {0},
  //raw1_delta_offset;
  0,
  //raw2_delta_offset;
  0,
        //.options.M1_calibr =
        1,
  //.options.button_scan =
  0,
  //.options.button_axis =
  0,
  //.options.button_setup_command =
  0b1110100110011110,
  //.options.button_nbr =
  7,
  //.options.button_spi_speed =
  3,
  //.options.button_thr_press =
  40,
  //.options.button_thr_release =
  20,
        //.options.custom =
        {0},
        //.options.bootlock =
        0xA5
    }
};

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值