#include "../sensor_common.hcs" root { accel_mxc6655xa_chip_config : sensorConfig { match_attr = "hdf_sensor_accel_mxc6655xa_driver"; sensorInfo :: sensorDeviceInfo { sensorName = "accelerometer"; vendorName = "memsi_mxc6655xa"; // max string length is 16 bytes sensorTypeId = 1; // enum SensorTypeTag sensorId = 1; // user define sensor id power = 230; minDelay = 5000000; // nanosecond maxDelay = 200000000; // nanosecond } sensorBusConfig :: sensorBusInfo { busType = 0; // 0:i2c 1:spi busNum = 5; busAddr = 0x15; regWidth = 1; // 1byte } sensorIdAttr :: sensorIdInfo { chipName = "mxc6655xa"; chipIdRegister = 0x0f; chipIdValue = 0x05; } sensorDirection { direction = 1; // chip direction range of value:0-7 /* 1:negative 0:positive 0:AXIS_X 1:AXIS_Y 2:AXIS_Z */ /* sign[AXIS_X], sign[AXIS_Y], sign[AXIS_Z], map[AXIS_X], map[AXIS_Y], map[AXIS_Z] */ convert = [ 0, 0, 0, 0, 1, 2, 1, 0, 0, 1, 0, 2, 0, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 2, 1, 0, 1, 0, 1, 2, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 2, 1, 1, 1, 1, 0, 2 ]; } sensorRegConfig { /* regAddr: register address value: config register value len: size of value mask: mask of value delay: config register delay time (ms) opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift shiftNum: shift bits debug: 0-no debug 1-debug save: 0-no save 1-save */ /* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */ initSeqConfig = [ 0x7e, 0xb6, 0xff, 1, 5, 2, 0, 0, 0, 0, 0x7e, 0x10, 0xff, 1, 5, 2, 0, 0, 0, 0 ]; enableSeqConfig = [ 0x7e, 0x11, 0xff, 1, 5, 2, 0, 0, 0, 0, 0x41, 0x03, 0xff, 1, 0, 2, 0, 0, 0, 0, 0x40, 0x08, 0xff, 1, 0, 2, 0, 0, 0, 0 ]; disableSeqConfig = [ 0x7e, 0x10, 0xff, 1, 5, 2, 0, 0, 0, 0 ]; } } }