/* Enable or disable the BMA220 sleep mode. 
This routine enables or disables the BMA220 sleep mode depending upon the value of the \sleep parameter; a \true value enables sleep mode and a \false value disables sleep mode by setting or clearing the 'sleep_en' bit, respectively. */
static void bma220_sleep_en(sensor_hal_t *hal, bool sleep)
/* Enable or disable the BMA220 sleep mode. 
This routine enables or disables the BMA220 sleep mode depending upon the value of the \sleep parameter; a \true value enables sleep mode and a \false value disables sleep mode by setting or clearing the 'sleep_en' bit, respectively. */
static void bma220_sleep_en(sensor_hal_t *hal, bool sleep)
{
	if (sleep) {
		sensor_reg_bitset(hal, BMA220_SLEEP_CONFIG, SLEEP_ENABLE);
	} else {
		sensor_reg_bitclear(hal, BMA220_SLEEP_CONFIG, SLEEP_ENABLE);
	}
}