2018-11-02 19:30:51 +00:00
|
|
|
#include "matrix.h"
|
|
|
|
#include "i2c_master.h"
|
2020-11-28 20:02:18 +00:00
|
|
|
#include "md_rgb_matrix.h"
|
2018-11-02 19:30:51 +00:00
|
|
|
#include "suspend.h"
|
|
|
|
|
|
|
|
/** \brief Suspend power down
|
|
|
|
*
|
|
|
|
* FIXME: needs doc
|
|
|
|
*/
|
2019-08-30 18:19:03 +00:00
|
|
|
void suspend_power_down(void) {
|
2019-04-04 01:30:47 +00:00
|
|
|
#ifdef RGB_MATRIX_ENABLE
|
2022-02-12 18:29:31 +00:00
|
|
|
I2C3733_Control_Set(0); // Disable LED driver
|
2019-04-04 01:30:47 +00:00
|
|
|
#endif
|
2018-11-02 19:30:51 +00:00
|
|
|
|
|
|
|
suspend_power_down_kb();
|
|
|
|
}
|
|
|
|
|
|
|
|
/** \brief run immediately after wakeup
|
2018-08-29 19:07:52 +00:00
|
|
|
*
|
2018-11-02 19:30:51 +00:00
|
|
|
* FIXME: needs doc
|
2018-08-29 19:07:52 +00:00
|
|
|
*/
|
2018-11-02 19:30:51 +00:00
|
|
|
void suspend_wakeup_init(void) {
|
2019-04-04 01:30:47 +00:00
|
|
|
#ifdef RGB_MATRIX_ENABLE
|
2019-08-30 18:19:03 +00:00
|
|
|
# ifdef USE_MASSDROP_CONFIGURATOR
|
2019-04-18 13:35:50 +00:00
|
|
|
if (led_enabled) {
|
|
|
|
I2C3733_Control_Set(1);
|
|
|
|
}
|
2019-08-30 18:19:03 +00:00
|
|
|
# else
|
2019-04-04 01:30:47 +00:00
|
|
|
I2C3733_Control_Set(1);
|
2019-08-30 18:19:03 +00:00
|
|
|
# endif
|
2019-04-04 01:30:47 +00:00
|
|
|
#endif
|
2018-08-29 19:07:52 +00:00
|
|
|
|
2018-11-02 19:30:51 +00:00
|
|
|
suspend_wakeup_init_kb();
|
|
|
|
}
|