Skip to content

Commit

Permalink
Fix typos and remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sihyung-maxim committed Sep 17, 2024
1 parent b51411a commit 79c5ac2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Examples/MAX32655/Demo_2048/ARM/inc/ipc_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ typedef struct {
#endif
} mxcSemaBox_t;

#define MAILBOX_MAIN_GRID_IDX (0) // Main grid indexes are from 0 to (16 blocks * 4 bytes) - 1.
#define MAILBOX_MAIN_GRID_IDX (0) // Main grid indices are from 0 to (16 blocks * 4 bytes) - 1.
#define MAILBOX_MAIN_GRID_STATE_IDX \
(4 * 16) // Indexes are from (4 bytes * 16) to ((4 bytes * 16) + (1 byte * 16)))
#define MAILBOX_KEYPRESS_IDX ((4 * 16) + (1 * 16)) // All indexes before are for the main grids.
(4 * 16) // Indices are from (4 bytes * 16) to ((4 bytes * 16) + (1 byte * 16)))
#define MAILBOX_KEYPRESS_IDX ((4 * 16) + (1 * 16)) // All indices before are for the main grids.
#define MAILBOX_IF_BLOCK_MOVED_IDX (MAILBOX_KEYPRESS_IDX + 1)
#define MAILBOX_NEW_BLOCK_LOCATION_IDX (MAILBOX_IF_BLOCK_MOVED_IDX + 1)
#define MAILBOX_GAME_STATE_IDX (MAILBOX_NEW_BLOCK_LOCATION_IDX + 1)
Expand Down
6 changes: 3 additions & 3 deletions Examples/MAX32655/Demo_2048/RISCV/inc/ipc_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ typedef struct {
#endif
} mxcSemaBox_t;

#define MAILBOX_MAIN_GRID_IDX (0) // Main grid indexes are from 0 to (16 blocks * 4 bytes) - 1.
#define MAILBOX_MAIN_GRID_IDX (0) // Main grid indices are from 0 to (16 blocks * 4 bytes) - 1.
#define MAILBOX_MAIN_GRID_STATE_IDX \
(4 * 16) // Indexes are from (4 bytes * 16) to ((4 bytes * 16) + (1 byte * 16)))
#define MAILBOX_KEYPRESS_IDX ((4 * 16) + (1 * 16)) // All indexes before are for the main grids.
(4 * 16) // Indices are from (4 bytes * 16) to ((4 bytes * 16) + (1 byte * 16)))
#define MAILBOX_KEYPRESS_IDX ((4 * 16) + (1 * 16)) // All indices before are for the main grids.
#define MAILBOX_IF_BLOCK_MOVED_IDX (MAILBOX_KEYPRESS_IDX + 1)
#define MAILBOX_NEW_BLOCK_LOCATION_IDX (MAILBOX_IF_BLOCK_MOVED_IDX + 1)
#define MAILBOX_GAME_STATE_IDX (MAILBOX_NEW_BLOCK_LOCATION_IDX + 1)
Expand Down
4 changes: 2 additions & 2 deletions Examples/MAX32655/Demo_2048/RISCV/src/game_2048.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// Did not choose to create defines for the size of the grid because
// 2048 is played on 4x4 grid.
// When using the grid as a single dimensional array, these are the
// the indexes assigned to each of the 16 squares.
// the indices assigned to each of the 16 squares.
// 0 | 1 | 2 | 3
// ---|---|---|---
// 4 | 5 | 6 | 7
Expand Down Expand Up @@ -100,7 +100,7 @@ static bool add_new_block(bool is_init, uint8_t *new_block_1D_idx_location)
// as a 1-D array.
// Locations of main Locations of main
// grid represented grid represented as
// as indexes for coordinates (row,col)
// as indices for coordinates (row,col)
// 1-D array: for 2-D array:
// 0 | 1 | 2 | 3 (0,0) | (0,1) | (0,2) | (0,3)
// ---|---|---|--- ------|-------|-------|------
Expand Down
1 change: 0 additions & 1 deletion Libraries/MiscDrivers/Display/tft_ssd2119.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,6 @@ void MXC_TFT_DrawBitmap(int px_x, int px_y, int width, int height, uint16_t *ima
int i = 0;
for (y = 0; y < h; y++) {
for (x = 0; x < w; x++) {
// g_fifo[0] = (0x01000100 | ((uint32_t)(image[i] & 0x00FF) << 16) | (uint32_t)((image[i] & 0xFF00) >> 8));
g_fifo[0] = (0x01000100 | ((uint32_t)(image[i] & 0x00FF)) |
(uint32_t)((image[i] & 0xFF00) << 8));
spi_transmit((uint16_t *)g_fifo, 2);
Expand Down

0 comments on commit 79c5ac2

Please sign in to comment.