[freeldr] Move custom.c, drivemap.c/h, miscboot.c/h to i386 directories
[reactos.git] / reactos / boot / freeldr / freeldr / arch / i386 / xboxi2c.c
index 02d0458..4bb5145 100644 (file)
@@ -12,9 +12,9 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #include <freeldr.h>
@@ -24,7 +24,7 @@
 
 #define I2C_IO_BASE 0xc000
 
-static BOOL
+static BOOLEAN
 WriteToSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, ULONG Data_to_smbus)
 {
   int nRetriesToLive=50;
@@ -95,7 +95,7 @@ WriteToSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, ULONG Data_to_smbus)
 }
 
 
-static BOOL
+static BOOLEAN
 ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, ULONG *Data_to_smbus)
 {
   int nRetriesToLive=50;
@@ -172,14 +172,14 @@ ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, ULONG *Data_to_smbus)
   return FALSE;
 }
 
-BOOL
+BOOLEAN
 I2CTransmitByteGetReturn(UCHAR bPicAddressI2cFormat, UCHAR bDataToWrite, ULONG *Return)
 {
   return ReadfromSMBus(bPicAddressI2cFormat, bDataToWrite, 1, Return);
 }
 
 // transmit a word, no returned data from I2C device
-static BOOL
+static BOOLEAN
 I2CTransmitWord(UCHAR bPicAddressI2cFormat, USHORT wDataToWrite)
 {
   return WriteToSMBus(bPicAddressI2cFormat,(wDataToWrite>>8)&0xff,1,(wDataToWrite&0xff));
@@ -196,10 +196,10 @@ I2cSetFrontpanelLed(UCHAR b)
 // r = Red, g = Green, o = Orange, x = Off
 // This func is taken from cromwell, all credits goes for them
 void
-XboxSetLED(UCHAR *pattern) {
-       char *x = pattern;
+XboxSetLED(PCSTR pattern) {
+       const char *x = pattern;
        int r, g;
-       
+
        if(strlen(pattern) == 4) {
                r = g = 0;
                while (*x) {
@@ -207,7 +207,7 @@ XboxSetLED(UCHAR *pattern) {
                        g *= 2;
                        switch (*x) {
                                case 'r':
-                                       r++; 
+                                       r++;
                                        break;
                                case 'g':
                                        g++;