Full Text Contents [hide] 1 Introduction2 Accelerometer 2.1 Android sensor sub system overview2.2 Driver porting 2.2.1 Modify LIS331DLH data structure2.2.2 Add I2C board info structure2.2.3 Register i2c bus2.2.4 Interrupt line modification 2.2.4.1 Pin mux change in board configuration file2.2.4.2 LIS331DLH driver file modification 2.3 Test Accelerometer driver2.4 Android hardware abstraction layer 2.4.1 Adding new sensor support in android HAL Ex: Accelerometer 2.4.1.1 Implement a sensor class2.4.1.2 Add new sensor support 2.5 Calibration methods 2.5.1 Changing axes directions and swapping axes 2.5.1.1 Driver Modification2.5.1.2 Android HAL modification 2.5.2 Accelerometer zero calibration 2.6 Important files