Fixed nullptr not being a valid uintptr_t
This commit is contained in:
parent
f1634a4dd7
commit
86d1db21f7
24
io.hpp
24
io.hpp
@ -142,9 +142,9 @@ static constexpr uintptr_t PORT_A_DIR_REG_ADDR = DDRA + __SFR_OFFSET;
|
|||||||
static constexpr uintptr_t PORT_A_OUTPUT_REG_ADDR = PORTA + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_A_OUTPUT_REG_ADDR = PORTA + __SFR_OFFSET;
|
||||||
static constexpr uintptr_t PORT_A_INPUT_REG_ADDR = PINA + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_A_INPUT_REG_ADDR = PINA + __SFR_OFFSET;
|
||||||
#else
|
#else
|
||||||
static constexpr uintptr_t PORT_A_DIR_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_A_DIR_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_A_OUTPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_A_OUTPUT_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_A_INPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_A_INPUT_REG_ADDR = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PORT_B_AVAILABLE
|
#ifdef PORT_B_AVAILABLE
|
||||||
@ -152,9 +152,9 @@ static constexpr uintptr_t PORT_B_DIR_REG_ADDR = DDRB + __SFR_OFFSET;
|
|||||||
static constexpr uintptr_t PORT_B_OUTPUT_REG_ADDR = PORTB + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_B_OUTPUT_REG_ADDR = PORTB + __SFR_OFFSET;
|
||||||
static constexpr uintptr_t PORT_B_INPUT_REG_ADDR = PINB + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_B_INPUT_REG_ADDR = PINB + __SFR_OFFSET;
|
||||||
#else
|
#else
|
||||||
static constexpr uintptr_t PORT_B_DIR_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_B_DIR_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_B_OUTPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_B_OUTPUT_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_B_INPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_B_INPUT_REG_ADDR = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PORT_C_AVAILABLE
|
#ifdef PORT_C_AVAILABLE
|
||||||
@ -162,9 +162,9 @@ static constexpr uintptr_t PORT_C_DIR_REG_ADDR = DDRC + __SFR_OFFSET;
|
|||||||
static constexpr uintptr_t PORT_C_OUTPUT_REG_ADDR = PORTC + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_C_OUTPUT_REG_ADDR = PORTC + __SFR_OFFSET;
|
||||||
static constexpr uintptr_t PORT_C_INPUT_REG_ADDR = PINC + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_C_INPUT_REG_ADDR = PINC + __SFR_OFFSET;
|
||||||
#else
|
#else
|
||||||
static constexpr uintptr_t PORT_C_DIR_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_C_DIR_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_C_OUTPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_C_OUTPUT_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_C_INPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_C_INPUT_REG_ADDR = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PORT_D_AVAILABLE
|
#ifdef PORT_D_AVAILABLE
|
||||||
@ -172,9 +172,9 @@ static constexpr uintptr_t PORT_D_DIR_REG_ADDR = DDRD + __SFR_OFFSET;
|
|||||||
static constexpr uintptr_t PORT_D_OUTPUT_REG_ADDR = PORTD + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_D_OUTPUT_REG_ADDR = PORTD + __SFR_OFFSET;
|
||||||
static constexpr uintptr_t PORT_D_INPUT_REG_ADDR = PIND + __SFR_OFFSET;
|
static constexpr uintptr_t PORT_D_INPUT_REG_ADDR = PIND + __SFR_OFFSET;
|
||||||
#else
|
#else
|
||||||
static constexpr uintptr_t PORT_D_DIR_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_D_DIR_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_D_OUTPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_D_OUTPUT_REG_ADDR = 0;
|
||||||
static constexpr uintptr_t PORT_D_INPUT_REG_ADDR = nullptr;
|
static constexpr uintptr_t PORT_D_INPUT_REG_ADDR = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef _SFR_IO8
|
#undef _SFR_IO8
|
||||||
|
Loading…
Reference in New Issue
Block a user