mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
use bitwise operators to manipulate bits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18521 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ff0b9a064c
commit
816eea85de
1 changed files with 3 additions and 3 deletions
|
@ -46,11 +46,11 @@ void init_qt1106(void)
|
|||
|
||||
oldval = PCON0;
|
||||
//Set P0.0 and P0.1 to output, set P0.3 and P0.4 to input
|
||||
PCON0 = ((oldval & ~(3 << 0 || 3 << 2 || 3 << 6 || 3 << 8)) | (1 << 0 | 1 << 2));
|
||||
PCON0 = ((oldval & ~(3 << 0 | 3 << 2 | 3 << 6 | 3 << 8)) | (1 << 0 | 1 << 2));
|
||||
|
||||
oldval = PCON1;
|
||||
//Set P1.5 to input, set P1.6 to input
|
||||
PCON1 = ((oldval & ~(0xf << 20 || 0xf << 24)) | (1 << 24));
|
||||
//Set P1.5 to input, set P1.6 to output
|
||||
PCON1 = ((oldval & ~(0xf << 20 | 0xf << 24)) | (1 << 24));
|
||||
|
||||
|
||||
SETSS();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue