* 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>
#define I2C_IO_BASE 0xc000
-static BOOL
+static BOOLEAN
WriteToSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, ULONG Data_to_smbus)
{
int nRetriesToLive=50;
}
-static BOOL
+static BOOLEAN
ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, ULONG *Data_to_smbus)
{
int nRetriesToLive=50;
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));
// 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) {
g *= 2;
switch (*x) {
case 'r':
- r++;
+ r++;
break;
case 'g':
g++;