Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f8fe26e4f | |||
| 5cabf4a4f8 | |||
| 6a17382a0a | |||
| 772e1198dd | |||
| afddd8c504 | |||
| 8b33c328be | |||
| d903619255 | |||
| f152400923 | |||
| f66c883d7c | |||
| 10be9486ff | |||
| 22fac72e1a | |||
| e9821abdb4 | |||
| 0bfff4e208 | |||
| 3772a913d0 | |||
| 91f3520239 | |||
| d4b96c7cb4 | |||
| 4fc9420625 | |||
| 50fa6362f9 | |||
| 726d5c411c | |||
| 1aed7f7c9d | |||
| 6ca0231124 |
@@ -0,0 +1,16 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run build
|
||||
run: |
|
||||
./build
|
||||
@@ -23,7 +23,11 @@ To un-install wiringPi:
|
||||
|
||||
./build uninstall
|
||||
|
||||
Gordon Henderson
|
||||
For help and support see:
|
||||
|
||||
projects@drogon.net
|
||||
* https://github.com/WiringPi/WiringPi/issues
|
||||
* https://discord.gg/SM4WUVG
|
||||
|
||||
|
||||
wiringPi originally created by Gordon Henderson
|
||||
https://projects.drogon.net/
|
||||
|
||||
@@ -36,8 +36,8 @@ check_make_ok() {
|
||||
echo ""
|
||||
echo "Make Failed..."
|
||||
echo "Please check the messages and fix any problems. If you're still stuck,"
|
||||
echo "then please email all the output and as many details as you can to"
|
||||
echo " projects@drogon.net"
|
||||
echo "then raise a GitHub issue with the output and as many details as you can"
|
||||
echo " https://github.com/WiringPi/WiringPi/issues"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ Gordon Henderson
|
||||
|
||||
.SH "REPORTING BUGS"
|
||||
|
||||
Please report bugs to <projects@drogon.net>
|
||||
Please report bugs to https://github.com/WiringPi/WiringPi/issues
|
||||
|
||||
.SH COPYRIGHT
|
||||
|
||||
|
||||
+5
-3
@@ -311,6 +311,8 @@ static void plus2header (int model)
|
||||
printf (" +-----+-----+---------+------+---+---Pi 3A+-+---+------+---------+-----+-----+\n") ;
|
||||
else if (model == PI_MODEL_4B)
|
||||
printf (" +-----+-----+---------+------+---+---Pi 4B--+---+------+---------+-----+-----+\n") ;
|
||||
else if (model == PI_MODEL_400)
|
||||
printf (" +-----+-----+---------+------+---+---Pi 400-+---+------+---------+-----+-----+\n") ;
|
||||
else
|
||||
printf (" +-----+-----+---------+------+---+---Pi ?---+---+------+---------+-----+-----+\n") ;
|
||||
}
|
||||
@@ -358,10 +360,10 @@ void doReadall (void)
|
||||
(model == PI_MODEL_2) ||
|
||||
(model == PI_MODEL_3AP) ||
|
||||
(model == PI_MODEL_3B) || (model == PI_MODEL_3BP) ||
|
||||
(model == PI_MODEL_4B) ||
|
||||
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W))
|
||||
(model == PI_MODEL_4B) || (model == PI_MODEL_400) ||
|
||||
(model == PI_MODEL_ZERO) || (model == PI_MODEL_ZERO_W) || (model == PI_MODEL_CM4))
|
||||
piPlusReadall (model) ;
|
||||
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3) || ((model == PI_MODEL_CM3P)))
|
||||
else if ((model == PI_MODEL_CM) || (model == PI_MODEL_CM3) || (model == PI_MODEL_CM3P) )
|
||||
allReadall () ;
|
||||
else
|
||||
printf ("Oops - unable to determine board type... model: %d\n", model) ;
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ static:
|
||||
|
||||
$(DYNAMIC): $(OBJ)
|
||||
$Q echo "[Link (Dynamic)]"
|
||||
$Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(LIBS) $(OBJ)
|
||||
$Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(OBJ) $(LIBS)
|
||||
|
||||
.c.o:
|
||||
$Q echo [Compile] $<
|
||||
|
||||
@@ -153,6 +153,9 @@ int softPwmCreate (int pin, int initialValue, int pwmRange)
|
||||
newPin = pin ;
|
||||
res = pthread_create (&myThread, NULL, softPwmThread, (void *)passPin) ;
|
||||
|
||||
if (res != 0)
|
||||
return res ;
|
||||
|
||||
while (newPin != -1)
|
||||
delay (1) ;
|
||||
|
||||
|
||||
+9
-6
@@ -219,7 +219,7 @@ volatile unsigned int *_wiringPiTimerIrqRaw ;
|
||||
|
||||
static volatile unsigned int piGpioBase = 0 ;
|
||||
|
||||
const char *piModelNames [20] =
|
||||
const char *piModelNames [21] =
|
||||
{
|
||||
"Model A", // 0
|
||||
"Model B", // 1
|
||||
@@ -240,7 +240,8 @@ const char *piModelNames [20] =
|
||||
"CM3+", // 16
|
||||
"Pi 4B", // 17
|
||||
"Unknown18", // 18
|
||||
"Unknown19", // 19
|
||||
"Pi 400", // 19
|
||||
"CM4", // 20
|
||||
} ;
|
||||
|
||||
const char *piRevisionNames [16] =
|
||||
@@ -290,7 +291,7 @@ const int piMemorySize [8] =
|
||||
1024, // 2
|
||||
2048, // 3
|
||||
4096, // 4
|
||||
0, // 5
|
||||
8192, // 5
|
||||
0, // 6
|
||||
0, // 7
|
||||
} ;
|
||||
@@ -1323,8 +1324,8 @@ struct wiringPiNodeStruct *wiringPiFindNode (int pin)
|
||||
|
||||
static void pinModeDummy (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int mode) { return ; }
|
||||
static void pullUpDnControlDummy (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int pud) { return ; }
|
||||
static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct *node, UNU int UNU pin) { return 0 ; }
|
||||
static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int value) { return ; }
|
||||
//static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct *node, UNU int UNU pin) { return 0 ; }
|
||||
//static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int value) { return ; }
|
||||
static int digitalReadDummy (UNU struct wiringPiNodeStruct *node, UNU int UNU pin) { return LOW ; }
|
||||
static void digitalWriteDummy (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int value) { return ; }
|
||||
static void pwmWriteDummy (UNU struct wiringPiNodeStruct *node, UNU int pin, UNU int value) { return ; }
|
||||
@@ -2048,7 +2049,7 @@ int wiringPiISR (int pin, int mode, void (*function)(void))
|
||||
return wiringPiFailure (WPI_FATAL, "wiringPiISR: Can't find gpio program\n") ;
|
||||
}
|
||||
else // Parent, wait
|
||||
wait (NULL) ;
|
||||
waitpid (pid, NULL, 0) ;
|
||||
}
|
||||
|
||||
// Now pre-open the /sys/class node - but it may already be open if
|
||||
@@ -2312,6 +2313,8 @@ int wiringPiSetup (void)
|
||||
break ;
|
||||
|
||||
case PI_MODEL_4B:
|
||||
case PI_MODEL_400:
|
||||
case PI_MODEL_CM4:
|
||||
piGpioBase = GPIO_PERI_BASE_2711 ;
|
||||
piGpioPupOffset = GPPUPPDN0 ;
|
||||
break ;
|
||||
|
||||
+3
-1
@@ -103,6 +103,8 @@
|
||||
#define PI_MODEL_3AP 14
|
||||
#define PI_MODEL_CM3P 16
|
||||
#define PI_MODEL_4B 17
|
||||
#define PI_MODEL_400 19
|
||||
#define PI_MODEL_CM4 20
|
||||
|
||||
#define PI_VERSION_1 0
|
||||
#define PI_VERSION_1_1 1
|
||||
@@ -114,7 +116,7 @@
|
||||
#define PI_MAKER_EMBEST 2
|
||||
#define PI_MAKER_UNKNOWN 3
|
||||
|
||||
extern const char *piModelNames [20] ;
|
||||
extern const char *piModelNames [21] ;
|
||||
extern const char *piRevisionNames [16] ;
|
||||
extern const char *piMakerNames [16] ;
|
||||
extern const int piMemorySize [ 8] ;
|
||||
|
||||
@@ -40,5 +40,4 @@ struct drcNetComStruct
|
||||
uint32_t pin ;
|
||||
uint32_t cmd ;
|
||||
uint32_t data ;
|
||||
} comDat ;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user