Interrupt Alerts on the LSM303DLHC

Some useful bit of info that the web should have.

I was having trouble setting up the LSM303DLHC accelerometer/compass chip for interrupt alerts. I sent over asking for some guidance from  ST and got a really useful, informative reply.

Their reply:

Thanks for your interest in STMicroelectronics MEMS products.

To generate an interrupt when one movement in one of the six directions is detected you have to set the following registers in the following way:
INT1_CFG_A -> 0xFF

Then you can set threshold and duration through INT1_THS_A and INT1_DURATION_A register.
The LSB value in the INT1_THS_A register is the following:
if FS = 2 about 16mg
if FS = 4 about 31mg
if FS = 8 about 63mg
The interrupt duration is calculate as N/ODR where N is the content of INT1_DURATION_A.

Thanks ST!