Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. void bytes_to_blocks(const int cols, const int offset, bool blocks[16][3], const int rows, bool bytes[5][8]) {
  2. int col = -1;
  3. int paragraph = 0;
  4. for(int row = 0; row < rows; row++) {
  5. col++;
  6. if(col > (cols -1)) {
  7. paragraph+=8;
  8. col =0;
  9. }
  10. for(int bit_index = 0; bit_index < 8; bit_index++) {
  11. blocks[bit_index+paragraph][col] = bytes[row][bit_index];
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement