mirror of https://github.com/joan2937/pigpio
Adding flag to disable alerts (polling of GPIOs)
This commit is contained in:
parent
c4c8ce50c6
commit
29bbd99b0e
3
pigpio.c
3
pigpio.c
|
@ -8115,10 +8115,13 @@ int initInitialise(void)
|
|||
if (pthread_attr_setstacksize(&pthAttr, STACK_SIZE))
|
||||
SOFT_ERROR(PI_INIT_FAILED, "pthread_attr_setstacksize failed (%m)");
|
||||
|
||||
if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT))
|
||||
{
|
||||
if (pthread_create(&pthAlert, &pthAttr, pthAlertThread, &i))
|
||||
SOFT_ERROR(PI_INIT_FAILED, "pthread_create alert failed (%m)");
|
||||
|
||||
pthAlertRunning = 1;
|
||||
}
|
||||
|
||||
if (!(gpioCfg.ifFlags & PI_DISABLE_FIFO_IF))
|
||||
{
|
||||
|
|
1
pigpio.h
1
pigpio.h
|
@ -846,6 +846,7 @@ typedef void *(gpioThreadFunc_t) (void *);
|
|||
#define PI_DISABLE_FIFO_IF 1
|
||||
#define PI_DISABLE_SOCK_IF 2
|
||||
#define PI_LOCALHOST_SOCK_IF 4
|
||||
#define PI_DISABLE_ALERT 8
|
||||
|
||||
/* memAllocMode */
|
||||
|
||||
|
|
Loading…
Reference in New Issue