aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parade_lspcon.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/parade_lspcon.c b/parade_lspcon.c
index 11c7bf3c..f425c127 100644
--- a/parade_lspcon.c
+++ b/parade_lspcon.c
@@ -43,22 +43,22 @@
#define SWSPI_RDATA 0x91
#define SWSPI_LEN 0x92
#define SWSPICTL 0x93
- #define SWSPICTL_ACCESS_TRIGGER 1
- #define SWSPICTL_CLEAR_PTR (1 << 1)
- #define SWSPICTL_NO_READ (1 << 2)
- #define SWSPICTL_ENABLE_READBACK (1 << 3)
- #define SWSPICTL_MOT (1 << 4)
+ #define SWSPICTL_ACCESS_TRIGGER BIT(0)
+ #define SWSPICTL_CLEAR_PTR BIT(1)
+ #define SWSPICTL_NO_READ BIT(2)
+ #define SWSPICTL_ENABLE_READBACK BIT(3)
+ #define SWSPICTL_MOT BIT(4)
#define SPISTATUS 0x9e
- #define SPISTATUS_BYTE_PROGRAM_FINISHED 0
- #define SPISTATUS_BYTE_PROGRAM_IN_IF 1
- #define SPISTATUS_BYTE_PROGRAM_SEND_DONE (1 << 1)
- #define SPISTATUS_SECTOR_ERASE_FINISHED 0
- #define SPISTATUS_SECTOR_ERASE_IN_IF (1 << 2)
- #define SPISTATUS_SECTOR_ERASE_SEND_DONE (1 << 3)
+ #define SPISTATUS_BYTE_PROGRAM_FINISHED 0
+ #define SPISTATUS_BYTE_PROGRAM_IN_IF BIT(0)
+ #define SPISTATUS_BYTE_PROGRAM_SEND_DONE BIT(1)
+ #define SPISTATUS_SECTOR_ERASE_FINISHED 0
+ #define SPISTATUS_SECTOR_ERASE_IN_IF BIT(2)
+ #define SPISTATUS_SECTOR_ERASE_SEND_DONE BIT(3)
#define SPISTATUS_CHIP_ERASE_FINISHED 0
- #define SPISTATUS_CHIP_ERASE_IN_IF (1 << 4)
- #define SPISTATUS_CHIP_ERASE_SEND_DONE (1 << 5)
- #define SPISTATUS_FW_UPDATE_ENABLE (1 << 6)
+ #define SPISTATUS_CHIP_ERASE_IN_IF BIT(4)
+ #define SPISTATUS_CHIP_ERASE_SEND_DONE BIT(5)
+ #define SPISTATUS_FW_UPDATE_ENABLE BIT(6)
#define WRITE_PROTECTION 0xb3
#define WRITE_PROTECTION_ON 0
#define WRITE_PROTECTION_OFF 0x10