tweaked i2c timings
haven't verified against a scope but they "work for me" running at 24MHz at all times now for best energy use per watt before sleeping
This commit is contained in:
parent
abd985e3a1
commit
7827085947
@ -26,9 +26,9 @@
|
||||
* - there is no ack on address. code always assumes slave is responding.
|
||||
*/
|
||||
#define i2c_init() i2cm_init()
|
||||
#define i2c_start() { SetSysClock_HSI(HCLK_24MHZ); i2cm_start(); }
|
||||
#define i2c_start() { /*SetSysClock_HSI(HCLK_24MHZ);*/ i2cm_start(); }
|
||||
#define i2c_restart() i2cm_restart()
|
||||
#define i2c_stop() { i2cm_stop(); SetSysClock_HSI(HCLK_8MHZ); }
|
||||
#define i2c_stop() { i2cm_stop(); /*SetSysClock_HSI(HCLK_16MHZ);*/ }
|
||||
#define i2c_rd(ack) i2cm_rd(ack)
|
||||
#define i2c_wr(dat) i2cm_wr(dat)
|
||||
#define i2c_addr(a, w) i2c_start(); i2cm_addr(a, w)
|
||||
|
||||
@ -28,8 +28,8 @@
|
||||
|
||||
|
||||
|
||||
#define CYCLES_TO_HI 2
|
||||
#define CYCLES_TO_LO 0
|
||||
#define CYCLES_TO_HI 1 // was 2
|
||||
#define CYCLES_TO_LO 0 // was 0
|
||||
|
||||
//#define CYCLES_RD 2 // cycles spent in read routine
|
||||
//#define CYCLES_WR_HI 2 // extra cycles spent in write routine
|
||||
|
||||
@ -29,7 +29,7 @@ uint8_t awled_fade[AW20X_FADE_COUNT];
|
||||
static uint8_t led_matrix_needs_update = 0;
|
||||
|
||||
const LedMap led_map = {
|
||||
// map is 1-based to match part numbers on the board
|
||||
// map is 1-based to match LED refdegs on the board
|
||||
.ribbon = { // ribbon
|
||||
13, 25, 1, 49,
|
||||
37, 14,
|
||||
@ -71,6 +71,7 @@ const LedMap led_map = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
LedMap led_set;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user