Set fan to 100% when in scratch ROM

This commit is contained in:
Jeremy Soller 2020-04-06 14:19:11 -06:00
parent dc246237c6
commit ff639a7836
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
3 changed files with 21 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#include <board/smfi.h>
#include <common/macro.h>
#include <ec/pwm.h>
// Include scratch ROM
uint8_t __code __at(SCRATCH_OFFSET) scratch_rom[] = {
@ -16,6 +17,12 @@ volatile uint8_t __xdata __at(0x1045) SCAR1H;
// Enter or exit scratch ROM
void scratch_trampoline(void) {
// Set fans to 100%
DCR2 = 0xFF;
//TODO: Clear keyboard presses
// Start watchdog timer
smfi_watchdog();
// Disable interrupts

View File

@ -3,6 +3,7 @@
#include <board/smfi.h>
#include <common/macro.h>
#include <ec/pwm.h>
// Include scratch ROM
uint8_t __code __at(SCRATCH_OFFSET) scratch_rom[] = {
@ -16,6 +17,12 @@ volatile uint8_t __xdata __at(0x1045) SCAR1H;
// Enter or exit scratch ROM
void scratch_trampoline(void) {
// Set fans to 100%
DCR2 = 0xFF;
//TODO: Clear keyboard presses
// Start watchdog timer
smfi_watchdog();
// Disable interrupts

View File

@ -3,6 +3,7 @@
#include <board/smfi.h>
#include <common/macro.h>
#include <ec/pwm.h>
// Include scratch ROM
uint8_t __code __at(SCRATCH_OFFSET) scratch_rom[] = {
@ -16,6 +17,12 @@ volatile uint8_t __xdata __at(0x1042) SCAR0H;
// Enter or exit scratch ROM
void scratch_trampoline(void) {
// Set fans to 100%
DCR2 = 0xFF;
//TODO: Clear keyboard presses
// Start watchdog timer
smfi_watchdog();
// Disable interrupts