fix unwrapping of driver pointer
This commit is contained in:
parent
c800ee85b2
commit
6e149606ba
4 changed files with 21 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
#include "b15f/wrapper/b15f.h"
|
||||
#include "../src/wrapper/b15f.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
|
@ -10,7 +10,11 @@ int main() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
uint8_t dip = read_dip_switch(instance, NULL, 0);
|
||||
uint8_t dip;
|
||||
if (read_dip_switch(instance, &dip, buf, sizeof(buf)) != 0) {
|
||||
fprintf(stderr, "%s\n", buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("DIP switch reads: ");
|
||||
for(uint8_t mask = 1; mask != 0; mask <<= 1) {
|
||||
|
@ -19,4 +23,4 @@ int main() {
|
|||
printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue