We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 072c277 commit 8309a23Copy full SHA for 8309a23
ports/raspberrypi/common-hal/mcp4822/MCP4822.c
@@ -143,8 +143,7 @@ void common_hal_mcp4822_mcp4822_construct(mcp4822_mcp4822_obj_t *self,
143
// The SET pin group spans from MOSI to CS.
144
// MOSI must have a lower GPIO number than CS, gap at most 4.
145
if (cs->number <= mosi->number || (cs->number - mosi->number) > 4) {
146
- mp_raise_ValueError(
147
- MP_ERROR_TEXT("cs pin must be 1-4 positions above mosi pin"));
+ mp_raise_ValueError_varg(MP_ERROR_TEXT("Invalid %q and %q"), MP_QSTR_CS, MP_QSTR_MOSI);
148
}
149
150
uint8_t set_count = cs->number - mosi->number + 1;
0 commit comments