/////////////////////////////////////////// BIT ROTATE RIGHT
| 348 | // BIT ROTATE RIGHT |
| 349 | // |
| 350 | uint8_t bitRotateRight(uint8_t value, uint8_t pos) |
| 351 | { |
| 352 | if (pos == 0) return value; |
| 353 | if (pos > 7) return value; |
| 354 | return (value << (8 - pos)) | (value >> pos); |
| 355 | } |
| 356 | |
| 357 | |
| 358 | uint16_t bitRotateRight(uint16_t value, uint8_t pos) |