gfdgd
Fork of PCA995xA by
Diff: PCA9955A/PCA9955A.cpp
- Revision:
- 6:1c6e1af61981
- Parent:
- 0:a624e2eeccac
- Child:
- 7:56a45c690801
--- a/PCA9955A/PCA9955A.cpp Thu Mar 19 10:47:49 2015 +0000 +++ b/PCA9955A/PCA9955A.cpp Sat Oct 31 06:07:15 2015 +0000 @@ -72,8 +72,12 @@ void PCA9955A::gradation_start( char group, char continuous_flag ) { static char v[] = { GRAD_CNTL, 0 }; - - v[ 1 ] = read( GRAD_CNTL ) | ((0x02 | continuous_flag) << (group * 2)); + char rd; + + rd = read( GRAD_CNTL ) & ~(0x3 << (group * 2)); + + printf( "rd = 0x%02X\r\n", rd ); + v[ 1 ] = rd | ((0x02 | continuous_flag) << (group * 2)); // v[ 1 ] = ((0x02 | continuous_flag) << (group * 2)); write( v, sizeof( v ) ); }