File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 20
20
21
21
#define NP_NAND_GOOD_BLOCK_MARK 0xFF
22
22
23
- enum
23
+ typedef enum
24
24
{
25
25
NP_CMD_NAND_READ_ID = 0x00 ,
26
26
NP_CMD_NAND_ERASE = 0x01 ,
31
31
NP_CMD_NAND_SELECT = 0x06 ,
32
32
NP_CMD_NAND_READ_BB = 0x07 ,
33
33
NP_CMD_NAND_LAST = 0x08 ,
34
- };
34
+ } np_cmd_code_t ;
35
35
36
36
enum
37
37
{
52
52
53
53
typedef struct __attribute__((__packed__ ))
54
54
{
55
- uint8_t code ;
55
+ np_cmd_code_t code ;
56
56
} np_cmd_t ;
57
57
58
58
typedef struct __attribute__((__packed__ ))
@@ -743,9 +743,9 @@ static np_cmd_handler_t cmd_handler[] =
743
743
{ NP_CMD_NAND_READ_BB , np_cmd_read_bad_blocks },
744
744
};
745
745
746
- static bool np_cmd_is_valid (int cmd )
746
+ static bool np_cmd_is_valid (np_cmd_code_t code )
747
747
{
748
- return cmd >= 0 && cmd < NP_CMD_NAND_LAST ;
748
+ return code >= 0 && code < NP_CMD_NAND_LAST ;
749
749
}
750
750
751
751
static int np_cmd_handler (np_prog_t * prog )
You can’t perform that action at this time.
0 commit comments