diff options
author | siddhu8990 | 2016-08-18 15:47:18 +0530 |
---|---|---|
committer | siddhu8990 | 2016-08-18 15:47:18 +0530 |
commit | c8fd6991786ccddb44547b619178bb391f3f9b96 (patch) | |
tree | cd1cacd7796d85875e8b2bb15780902c55f42db1 /src/c/elementaryFunctions/bitset | |
parent | 24fbba33153e7758df4a990cb4c21ae8e53e6f3e (diff) | |
download | scilab2c-c8fd6991786ccddb44547b619178bb391f3f9b96.tar.gz scilab2c-c8fd6991786ccddb44547b619178bb391f3f9b96.tar.bz2 scilab2c-c8fd6991786ccddb44547b619178bb391f3f9b96.zip |
RPi-PWM and basic imaage processing
Diffstat (limited to 'src/c/elementaryFunctions/bitset')
-rw-r--r-- | src/c/elementaryFunctions/bitset/u16bitsets.c | 4 | ||||
-rw-r--r-- | src/c/elementaryFunctions/bitset/u8bitsets.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/c/elementaryFunctions/bitset/u16bitsets.c b/src/c/elementaryFunctions/bitset/u16bitsets.c index 953e46c9..ff72be3f 100644 --- a/src/c/elementaryFunctions/bitset/u16bitsets.c +++ b/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/src/c/elementaryFunctions/bitset/u8bitsets.c b/src/c/elementaryFunctions/bitset/u8bitsets.c index 5f44dcd8..b97a1575 100644 --- a/src/c/elementaryFunctions/bitset/u8bitsets.c +++ b/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); } |