Use enum for EC OS
This commit is contained in:
		
				
					committed by
					
						
						Jeremy Soller
					
				
			
			
				
	
			
			
			
						parent
						
							024f4de620
						
					
				
				
					commit
					f3688be919
				
			@@ -16,7 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
extern uint8_t sci_extra;
 | 
					extern uint8_t sci_extra;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint8_t acpi_ecos = 0;
 | 
					enum EcOs acpi_ecos = EC_OS_NONE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static uint8_t fcmd = 0;
 | 
					static uint8_t fcmd = 0;
 | 
				
			||||||
static uint8_t fdat = 0;
 | 
					static uint8_t fdat = 0;
 | 
				
			||||||
@@ -56,8 +56,8 @@ void acpi_reset(void) {
 | 
				
			|||||||
    // Disable lid wake
 | 
					    // Disable lid wake
 | 
				
			||||||
    lid_wake = false;
 | 
					    lid_wake = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // ECOS: No ACPI
 | 
					    // ECOS: No ACPI or driver
 | 
				
			||||||
    acpi_ecos = 0;
 | 
					    acpi_ecos = EC_OS_NONE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if HAVE_LED_AIRPLANE_N
 | 
					#if HAVE_LED_AIRPLANE_N
 | 
				
			||||||
    // Clear airplane mode LED
 | 
					    // Clear airplane mode LED
 | 
				
			||||||
@@ -182,7 +182,7 @@ void acpi_write(uint8_t addr, uint8_t data) {
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case 0x68:
 | 
					        case 0x68:
 | 
				
			||||||
            acpi_ecos = data;
 | 
					            acpi_ecos = (enum EcOs)data;
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case 0xBC:
 | 
					        case 0xBC:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,15 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern uint8_t acpi_ecos;
 | 
					enum EcOs {
 | 
				
			||||||
 | 
					    // No ACPI or driver support
 | 
				
			||||||
 | 
					    EC_OS_NONE=0,
 | 
				
			||||||
 | 
					    // ACPI, but no driver support
 | 
				
			||||||
 | 
					    EC_OS_ACPI=1,
 | 
				
			||||||
 | 
					    // ACPI with driver, full support
 | 
				
			||||||
 | 
					    EC_OS_FULL=2,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					extern enum EcOs acpi_ecos;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void acpi_reset(void);
 | 
					void acpi_reset(void);
 | 
				
			||||||
uint8_t acpi_read(uint8_t addr);
 | 
					uint8_t acpi_read(uint8_t addr);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user