| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright (C) 2019 Siemens AG | ||
| * | ||
| * This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
| #ifndef _COMMONLIB_SORT_H_ | ||
| #define _COMMONLIB_SORT_H_ | ||
|
|
||
| #include <stddef.h> | ||
|
|
||
| typedef enum { | ||
| NUM_ASCENDING, | ||
| NUM_DESCENDING | ||
| } sort_order_t; | ||
|
|
||
| void bubblesort(int *v, size_t num_entries, sort_order_t order); | ||
|
|
||
| #endif /* _COMMONLIB_SORT_H_ */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright (C) 2019 Siemens AG | ||
| * | ||
| * This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
| #include <commonlib/helpers.h> | ||
| #include <commonlib/sort.h> | ||
|
|
||
| /* Implement a simple Bubble sort algorithm. Reduce the needed number of | ||
| iterations by taking care of already sorted entries in the list. */ | ||
| void bubblesort(int *v, size_t num_entries, sort_order_t order) | ||
| { | ||
| size_t i, j; | ||
| int swapped; | ||
|
|
||
| for (j = 0; j < num_entries - 1; j++) { | ||
| swapped = 0; | ||
| for (i = 0; i < num_entries - j - 1; i++) { | ||
| switch (order) { | ||
| case NUM_ASCENDING: | ||
| if (v[i] > v[i + 1]) { | ||
| SWAP(v[i], v[i + 1]); | ||
| swapped = 1; | ||
| } | ||
| break; | ||
| case NUM_DESCENDING: | ||
| if (v[i] < v[i + 1]) { | ||
| SWAP(v[i], v[i + 1]); | ||
| swapped = 1; | ||
| } | ||
| break; | ||
| default: | ||
| return; | ||
| } | ||
| } | ||
| if (!swapped) | ||
| break; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ | |
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
| #include <console/console.h> | ||
| #include <halt.h> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ | |
|
|
||
| #include "gpio.h" | ||
|
|
||
| #include <device/mmio.h> | ||
|
|
||
| static struct a10_gpio *const gpio = (void *)GPIO_BASE; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ | |
|
|
||
| #include "gpio.h" | ||
|
|
||
| #include <device/mmio.h> | ||
|
|
||
| static struct a10_gpio *const gpio = (void *)GPIO_BASE; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ | |
|
|
||
| #include "timer.h" | ||
|
|
||
| #include <device/mmio.h> | ||
| #include <delay.h> | ||
| #include <timer.h> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| subdirs-y += ../model_6ex | ||
| subdirs-y += ../model_6fx | ||
| subdirs-y += ../../x86/tsc | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| config DRIVERS_INTEL_ISH | ||
| bool | ||
| help | ||
| When enabled, chip driver/intel/ish will publish information to the | ||
| SSDT _DSD table for the ISH device. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ramstage-$(CONFIG_DRIVERS_INTEL_ISH) += ish.c |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright 2019 Google LLC | ||
| * | ||
| * This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
| #include <arch/acpi_device.h> | ||
| #include <arch/acpigen.h> | ||
| #include <console/console.h> | ||
| #include <device/pci.h> | ||
| #include <device/pci_ids.h> | ||
| #include "chip.h" | ||
|
|
||
| static void ish_fill_ssdt_generator(struct device *dev) | ||
| { | ||
| struct drivers_intel_ish_config *config = dev->chip_info; | ||
| struct device *root = dev->bus->dev; | ||
| struct acpi_dp *dsd; | ||
|
|
||
| if (!dev->enabled || !config || !config->firmware_name) | ||
| return; | ||
|
|
||
| acpigen_write_scope(acpi_device_path(root)); | ||
|
|
||
| dsd = acpi_dp_new_table("_DSD"); | ||
| acpi_dp_add_string(dsd, "firmware-name", config->firmware_name); | ||
| acpi_dp_write(dsd); | ||
|
|
||
| acpigen_pop_len(); /* Scope */ | ||
|
|
||
| printk(BIOS_INFO, "%s: Set firmware-name: %s\n", | ||
| acpi_device_path(root), config->firmware_name); | ||
| } | ||
|
|
||
| static struct device_operations intel_ish_ops = { | ||
| .read_resources = DEVICE_NOOP, | ||
| .set_resources = DEVICE_NOOP, | ||
| .enable_resources = DEVICE_NOOP, | ||
| .acpi_fill_ssdt_generator = ish_fill_ssdt_generator, | ||
| }; | ||
|
|
||
| static void intel_ish_enable(struct device *dev) | ||
| { | ||
| /* This dev is a generic device that is a child to the ISH PCI device */ | ||
| dev->ops = &intel_ish_ops; | ||
| } | ||
|
|
||
| /* Copy of default_pci_ops_dev with scan_bus addition */ | ||
| static const struct device_operations pci_ish_device_ops = { | ||
| .read_resources = pci_dev_read_resources, | ||
| .set_resources = pci_dev_set_resources, | ||
| .enable_resources = pci_dev_enable_resources, | ||
| .init = pci_dev_init, | ||
| .scan_bus = &scan_generic_bus, /* Non-default */ | ||
| .ops_pci = &pci_dev_ops_pci, | ||
| }; | ||
|
|
||
| static const unsigned short pci_device_ids[] = { | ||
| PCI_DEVICE_ID_INTEL_CNL_ISHB, | ||
| 0 | ||
| }; | ||
|
|
||
| static const struct pci_driver ish_intel_driver __pci_driver = { | ||
| .ops = &pci_ish_device_ops, | ||
| .vendor = PCI_VENDOR_ID_INTEL, | ||
| .devices = pci_device_ids, | ||
| }; | ||
|
|
||
| struct chip_operations drivers_intel_ish_ops = { | ||
| CHIP_NAME("Intel ISH Chip") | ||
| .enable_dev = intel_ish_enable, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright 2019 Google LLC | ||
| * | ||
| * This program is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU General Public License as | ||
| * published by the Free Software Foundation; version 2 of | ||
| * the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
| /* | ||
| * Intel Virtual Button driver compatible with the driver found in | ||
| * the Linux kernel at drivers/platform/x86/intel-vbtn.c | ||
| * | ||
| * For tablet/laptop and dock/undock events to work the board must | ||
| * select SYSTEM_TYPE_CONVERTIBLE for the SMBIOS enclosure type to | ||
| * indicate the device is a convertible. | ||
| */ | ||
|
|
||
| Name (FLAP, 0x40) /* Flag indicating device is in laptop mode */ | ||
|
|
||
| /* Virtual events */ | ||
| Name (VPPB, 0xc0) /* Power Button press */ | ||
| Name (VRPB, 0xc1) /* Power Button release */ | ||
| Name (VPSP, 0xc2) /* Special key press (LEFTMETA in Linux) */ | ||
| Name (VRSP, 0xc3) /* Special key release (LEFTMETA in Linux) */ | ||
| Name (VPVU, 0xc4) /* Volume Up press */ | ||
| Name (VRVU, 0xc5) /* Volume Up release */ | ||
| Name (VPVD, 0xc6) /* Volume Down press */ | ||
| Name (VRVD, 0xc7) /* Volume Down release */ | ||
| Name (VPRL, 0xc8) /* Rotate Lock press */ | ||
| Name (VRRL, 0xc9) /* Rotate Lock release */ | ||
| Name (VDOC, 0xca) /* Docked */ | ||
| Name (VUND, 0xcb) /* Undocked */ | ||
| Name (VTBL, 0xcc) /* Tablet Mode */ | ||
| Name (VLAP, 0xcd) /* Laptop Mode */ | ||
|
|
||
| Device (VBTN) | ||
| { | ||
| Name (_HID, "INT33D6") | ||
| Name (_UID, One) | ||
| Name (_DDN, "Intel Virtual Button Driver") | ||
|
|
||
| /* | ||
| * This method is called at driver probe time and must exist or | ||
| * the driver will not load. | ||
| */ | ||
| Method (VBDL) | ||
| { | ||
| } | ||
|
|
||
| /* | ||
| * This method returns flags indicating tablet and dock modes. | ||
| * It is called at driver probe time so the OS knows what the | ||
| * state of the device is at boot. | ||
| */ | ||
| Method (VGBS) | ||
| { | ||
| Local0 = Zero | ||
|
|
||
| /* Check EC orientation for tablet mode flag */ | ||
| If (R (OTBL)) { | ||
| Printf ("EC reports tablet mode at boot") | ||
| } Else { | ||
| Printf ("EC reports laptop mode at boot") | ||
| Local0 |= ^^FLAP | ||
| } | ||
| Return (Local0) | ||
| } | ||
|
|
||
| Method(_STA, 0) | ||
| { | ||
| Return (0xF) | ||
| } | ||
| } | ||
|
|
||
| Device (VBTO) | ||
| { | ||
| Name (_HID, "INT33D3") | ||
| Name (_CID, "PNP0C60") | ||
| Name (_UID, One) | ||
| Name (_DDN, "Laptop/tablet mode indicator driver") | ||
|
|
||
| Method (_STA, 0) | ||
| { | ||
| Return (0xF) | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
| */ | ||
|
|
||
| #include <arch/io.h> | ||
| #include <device/pnp_ops.h> | ||
| #include <device/pnp.h> | ||
| #include "ec.h" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,182 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright (c) 2017 Arthur Heymans <arthur@aheymans.xyz> | ||
| * Copyright (c) 2018 Evgeny Zinoviev <me@ch1p.com> | ||
| * | ||
| * This program is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU General Public License as | ||
| * published by the Free Software Foundation; version 2 of | ||
| * the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
| /* | ||
| * This defines the battery charging thresholds setting methods tpacpi-bat can | ||
| * use. This implements what the vendor defines but is rather ugly... | ||
| */ | ||
|
|
||
| /* SetBatteryCharge Start/Stop Capacity Threshold | ||
| * In Parameter: | ||
| * DWORD | ||
| * Bit 7-0: Charge stop capacity (Unit:%) | ||
| * =0: Use battery default setting | ||
| * =1-99: Threshold to stop charging battery (Relative capacity) | ||
| * Bit 9-8:BatteryID | ||
| * = 0: Any battery | ||
| * = 1: Primary battery | ||
| * = 2: Secondary battery | ||
| * = Others: Reserved (0) | ||
| * Bit 31-10: Reserved (0) | ||
| * Must be Zero | ||
| * | ||
| * Out Parameter: | ||
| * DWORD | ||
| * Bit 30-0: Reserved (0) | ||
| * Bit 31: Error status | ||
| * 0 ... Success | ||
| * 1 ... Fail | ||
| */ | ||
|
|
||
| #define START_THRESH_ARG 0 | ||
| #define STOP_THRESH_ARG 1 | ||
|
|
||
| // Set stop threshold | ||
| Method (BCSS, 1, NotSerialized) | ||
| { | ||
| Local0 = Arg0 & 0xff // Percentage | ||
| Local1 = (Arg0 >> 8) & 0x3 // Battery ID | ||
|
|
||
| // Any battery | ||
| If (Local1 == 0) | ||
| { | ||
| \_SB.PCI0.LPCB.EC.BAT0.SETT(STOP_THRESH_ARG, Local0) | ||
| \_SB.PCI0.LPCB.EC.BAT1.SETT(STOP_THRESH_ARG, Local0) | ||
|
|
||
| Local2 = Local0 != \_SB.PCI0.LPCB.EC.BAT0.GETT(STOP_THRESH_ARG) | ||
| Local3 = Local0 != \_SB.PCI0.LPCB.EC.BAT1.GETT(STOP_THRESH_ARG) | ||
|
|
||
| Return ((Local2 && Local3) << 31) | ||
| } | ||
|
|
||
| // Battery1 | ||
| If (Local1 == 1) | ||
| { | ||
| \_SB.PCI0.LPCB.EC.BAT0.SETT(STOP_THRESH_ARG, Local0) | ||
| Return ((Local0 != | ||
| \_SB.PCI0.LPCB.EC.BAT0.GETT(STOP_THRESH_ARG)) << 31) | ||
| } | ||
|
|
||
| // Battery2 | ||
| If (Local1 == 2) | ||
| { | ||
| \_SB.PCI0.LPCB.EC.BAT1.SETT(STOP_THRESH_ARG, Local0) | ||
| Return ((Local0 != | ||
| \_SB.PCI0.LPCB.EC.BAT1.GETT(STOP_THRESH_ARG)) << 31) | ||
| } | ||
|
|
||
| Return (1 << 31) /* Should not be reached */ | ||
| } | ||
|
|
||
| // Set start threshold | ||
| Method (BCCS, 1, NotSerialized) | ||
| { | ||
| Local0 = Arg0 & 0xff // Percentage | ||
| Local1 = (Arg0 >> 8) & 0x3 // Battery ID | ||
|
|
||
| // Any battery | ||
| If (Local1 == 0) | ||
| { | ||
| \_SB.PCI0.LPCB.EC.BAT0.SETT(START_THRESH_ARG, Local0) | ||
| \_SB.PCI0.LPCB.EC.BAT1.SETT(START_THRESH_ARG, Local0) | ||
|
|
||
| Local2 = Local0 != \_SB.PCI0.LPCB.EC.BAT0.GETT(START_THRESH_ARG) | ||
| Local3 = Local0 != \_SB.PCI0.LPCB.EC.BAT1.GETT(START_THRESH_ARG) | ||
|
|
||
| Return ((Local2 && Local3) << 31) | ||
| } | ||
|
|
||
| // Battery1 | ||
| If (Local1 == 1) | ||
| { | ||
| \_SB.PCI0.LPCB.EC.BAT0.SETT(START_THRESH_ARG, Local0) | ||
| Return ((Local0 != | ||
| \_SB.PCI0.LPCB.EC.BAT0.GETT(START_THRESH_ARG)) << 31) | ||
| } | ||
|
|
||
| // Battery2 | ||
| If (Local1 == 2) | ||
| { | ||
| \_SB.PCI0.LPCB.EC.BAT1.SETT(START_THRESH_ARG, Local0) | ||
| Return ((Local0 != | ||
| \_SB.PCI0.LPCB.EC.BAT1.GETT(START_THRESH_ARG)) << 31) | ||
| } | ||
|
|
||
| Return (1 << 31) /* Should not be reached */ | ||
| } | ||
|
|
||
| /* | ||
| * GetBatteryCharge Start/Stop Capacity Threshold | ||
| * In Parameter: | ||
| * DWORD | ||
| * Bit 7-0:BatteryID | ||
| * Bit 31-8: Reserved (0) | ||
| * Must be Zero | ||
| * | ||
| * Out Parameter: | ||
| * DWORD | ||
| * Bit 7-0: Charge stop capacity (Unit:%) | ||
| * =0: Use battery default setting | ||
| * =1-99: Threshold to stop charging battery (Relative capacity) | ||
| * =Others: Reserved (0) | ||
| * Bit 9-8: Capability of BatteryCharge Stop Capacity Threshold | ||
| * Bit 8:Batterycharge stop capacity threshold | ||
| * (0:Not support 1:Support) | ||
| * Bit 9: Specify every battery parameter | ||
| * (0:Not support(apply parameter for all battery) | ||
| * 1:Support(apply parameter for all battery)) | ||
| * Bit 30-10: Reserved (0) | ||
| * Bit 31: Error status | ||
| * 0 ... Success | ||
| * 1 ... Fail | ||
| */ | ||
|
|
||
| // Get stop threshold | ||
| Method (BCSG, 1, NotSerialized) | ||
| { | ||
| // Battery1 | ||
| If (Arg0 == 1) | ||
| { | ||
| Return (0x300 | \_SB.PCI0.LPCB.EC.BAT0.GETT(STOP_THRESH_ARG)) | ||
| } | ||
|
|
||
| // Battery2 | ||
| If (Arg0 == 2) | ||
| { | ||
| Return (0x300 | \_SB.PCI0.LPCB.EC.BAT1.GETT(STOP_THRESH_ARG)) | ||
| } | ||
|
|
||
| Return (1 << 31) | ||
| } | ||
|
|
||
| // Get start threshold | ||
| Method (BCTG, 1, NotSerialized) | ||
| { | ||
| // Battery 1 | ||
| If (Arg0 == 1) | ||
| { | ||
| Return (0x300 | \_SB.PCI0.LPCB.EC.BAT0.GETT(START_THRESH_ARG)) | ||
| } | ||
|
|
||
| // Battery 2 | ||
| If (Arg0 == 2) | ||
| { | ||
| Return (0x300 | \_SB.PCI0.LPCB.EC.BAT1.GETT(START_THRESH_ARG)) | ||
| } | ||
|
|
||
| Return (1 << 31) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright (c) 2017 Arthur Heymans <arthur@aheymans.xyz> | ||
| * Copyright (c) 2018 Evgeny Zinoviev <me@ch1p.com> | ||
| * | ||
| * This program is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU General Public License as | ||
| * published by the Free Software Foundation; version 2 of | ||
| * the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
|
|
||
| Scope(\_SB.PCI0.LPCB.EC) | ||
| { | ||
| Field (ERAM, ByteAcc, NoLock, Preserve) | ||
| { | ||
| Offset (0x03), | ||
| , 2, | ||
| BSTP, 1, /* Battery start/stop threshold */ | ||
| Offset (0x24), | ||
| TSH0, 8, /* Battery0 threshold */ | ||
| Offset (0x25), | ||
| TSH1, 8, /* Battery1 threshold */ | ||
| } | ||
| } | ||
|
|
||
| Scope(\_SB.PCI0.LPCB.EC.BAT0) | ||
| { | ||
| /* | ||
| * Set threshold on battery0, | ||
| * | ||
| * Arg0: 0: Start threshold | ||
| * 1: Stop threshold | ||
| * Arg1: Percentage | ||
| */ | ||
| Method (SETT, 2, NotSerialized) | ||
| { | ||
| if (Arg0 <= 1 && Arg1 <= 100) | ||
| { | ||
| BSTP = Arg0 | ||
| #if defined(H8_BAT_THRESHOLDS_BIT7) | ||
| TSH0 = Arg1 | ||
| #else | ||
| TSH0 = Arg1 | 0x80 | ||
| #endif | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Get threshold on battery0 | ||
| * | ||
| * Arg0: 0: Start threshold | ||
| * 1: Stop threshold | ||
| */ | ||
| Method (GETT, 1, NotSerialized) | ||
| { | ||
| if (Arg0 <= 1) | ||
| { | ||
| BSTP = Arg0 | ||
| #if defined(H8_BAT_THRESHOLDS_BIT7) | ||
| Return (TSH0) | ||
| #else | ||
| Return (TSH0 & ~0x80) | ||
| #endif | ||
| } | ||
| Return (0) | ||
| } | ||
| } | ||
|
|
||
| Scope(\_SB.PCI0.LPCB.EC.BAT1) | ||
| { | ||
| /* | ||
| * Set threshold on battery1 | ||
| * | ||
| * Arg0: 0: Start threshold | ||
| * 1: Stop threshold | ||
| * Arg1: Percentage | ||
| */ | ||
| Method (SETT, 2, NotSerialized) | ||
| { | ||
| if (Arg0 <= 1 && Arg1 <= 100) | ||
| { | ||
| BSTP = Arg0 | ||
| #if defined(H8_BAT_THRESHOLDS_BIT7) | ||
| TSH1 = Arg1 | ||
| #else | ||
| TSH1 = Arg1 | 0x80 | ||
| #endif | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Get threshold on battery1 | ||
| * | ||
| * Arg0: 0: Start threshold | ||
| * 1: Stop threshold | ||
| */ | ||
| Method (GETT, 1, NotSerialized) | ||
| { | ||
| if (Arg0 <= 1) | ||
| { | ||
| BSTP = Arg0 | ||
| #if defined(H8_BAT_THRESHOLDS_BIT7) | ||
| Return (TSH1) | ||
| #else | ||
| Return (TSH1 & ~0x80) | ||
| #endif | ||
| } | ||
| Return (0) | ||
| } | ||
| } |