Changeset 31282f9 in mainline


Ignore:
Timestamp:
2006-05-07T15:54:38Z (19 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
381465e
Parents:
2bb8648
Message:

FB endian fix

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/include/byteorder.h

    r2bb8648 r31282f9  
    3333#include <byteorder.h>
    3434
     35#define BIG_ENDIAN
     36
    3537static inline __u64 __u64_le2host(__u64 n)
    3638{
  • arch/ppc64/include/byteorder.h

    r2bb8648 r31282f9  
    3333#include <byteorder.h>
    3434
     35#define BIG_ENDIAN
     36
    3537static inline __u64 __u64_le2host(__u64 n)
    3638{
  • genarch/src/fb/fb.c

    r2bb8648 r31282f9  
    8686        unsigned int startbyte = POINTPOS(x, y);
    8787
     88#ifdef BIG_ENDIAN
    8889        fbaddress[startbyte] = RED(color, 8);
    8990        fbaddress[startbyte + 1] = GREEN(color, 8);
    9091        fbaddress[startbyte + 2] = BLUE(color, 8);
     92#else
     93        fbaddress[startbyte + 2] = RED(color, 8);
     94        fbaddress[startbyte + 1] = GREEN(color, 8);
     95        fbaddress[startbyte + 0] = BLUE(color, 8);
     96#endif 
    9197}
    9298
     
    96102        unsigned int startbyte = POINTPOS(x, y);
    97103
     104#ifdef BIG_ENDIAN
    98105        return fbaddress[startbyte] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 2];
     106#else
     107        return fbaddress[startbyte + 2] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 0];
     108#endif 
    99109}
    100110
Note: See TracChangeset for help on using the changeset viewer.