Merge pull request #1041 from uknoblic/cc2538_i2c

Fix CC2538 I2C clock computation bug
This commit is contained in:
George Oikonomou 2015-04-29 13:35:01 +01:00
commit c2740fedb2

View file

@ -50,7 +50,7 @@ get_sys_clock(void)
{
/* Get the clock status diviser */
return SYS_CTRL_32MHZ /
((REG(SYS_CTRL_CLOCK_STA) & SYS_CTRL_CLOCK_STA_SYS_DIV) + 1);
(1 << (REG(SYS_CTRL_CLOCK_STA) & SYS_CTRL_CLOCK_STA_SYS_DIV));
}
/*---------------------------------------------------------------------------*/
void