diff options
author | siddhu8990 | 2016-08-18 15:47:18 +0530 |
---|---|---|
committer | siddhu8990 | 2016-08-18 15:47:18 +0530 |
commit | 1552675d4ac3be8d265bcf089fbc1ac5be1547f9 (patch) | |
tree | 4162a70fa63681584c6d5485b08b516e64015569 /2.3-1/src/c/elementaryFunctions/bitset | |
parent | 21ab4886b202a52189b398bd9d3137e2a567d62a (diff) | |
download | Scilab2C-1552675d4ac3be8d265bcf089fbc1ac5be1547f9.tar.gz Scilab2C-1552675d4ac3be8d265bcf089fbc1ac5be1547f9.tar.bz2 Scilab2C-1552675d4ac3be8d265bcf089fbc1ac5be1547f9.zip |
RPi-PWM and basic imaage processing
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/bitset')
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/bitset/u16bitsets.c | 4 | ||||
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/bitset/u8bitsets.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/bitset/u16bitsets.c b/2.3-1/src/c/elementaryFunctions/bitset/u16bitsets.c index 953e46c9..ff72be3f 100644 --- a/2.3-1/src/c/elementaryFunctions/bitset/u16bitsets.c +++ b/2.3-1/src/c/elementaryFunctions/bitset/u16bitsets.c @@ -7,12 +7,12 @@ uint16 u16bitsets(uint16 value,int position,int bit_value) { if(bit_value==1) { - unsigned char mask1 = 1 << (position-1) ; // we could cast to unsigned char, just to be safe + unsigned char mask1 = 1 << (position-1) ; /* we could cast to unsigned char, just to be safe */ return (mask1 | value); } else { - unsigned char mask2 = ~(1 << (position-1)); // we could cast to unsigned char, just to be safe + unsigned char mask2 = ~(1 << (position-1)); /*we could cast to unsigned char, just to be safe*/ return (mask2 & value); } diff --git a/2.3-1/src/c/elementaryFunctions/bitset/u8bitsets.c b/2.3-1/src/c/elementaryFunctions/bitset/u8bitsets.c index 5f44dcd8..b97a1575 100644 --- a/2.3-1/src/c/elementaryFunctions/bitset/u8bitsets.c +++ b/2.3-1/src/c/elementaryFunctions/bitset/u8bitsets.c @@ -7,12 +7,12 @@ uint8 u8bitsets(uint8 value,int position,int bit_value) { if(bit_value==1) { - unsigned char mask1 = 1 << (position-1) ; // we could cast to unsigned char, just to be safe + unsigned char mask1 = 1 << (position-1) ; /* we could cast to unsigned char, just to be safe */ return (mask1 | value); } else { - unsigned char mask2 = ~(1 << (position-1)); // we could cast to unsigned char, just to be safe + unsigned char mask2 = ~(1 << (position-1)); /* we could cast to unsigned char, just to be safe */ return (mask2 & value); } |