Remove deprecated gpioCfgInternals API. Fix issue #341.

This commit is contained in:
Guy McSwain 2020-06-25 23:02:41 -05:00
parent 1c5b27f41d
commit d7379baf9b
4 changed files with 11 additions and 52 deletions

Binary file not shown.

View File

@ -2610,7 +2610,7 @@ $ pigs wvas 7 38400 8 2 0 0x41 0x42
WVTAT :: WVTAT ::
This command returns the id of the waveform currently This command returns the id of the waveform currently
being transmitted. being transmitted. Chained waves are not supported.
Returns the waveform id or one of the following special Returns the waveform id or one of the following special
values: values:

View File

@ -14002,44 +14002,6 @@ int gpioCfgSetInternals(uint32_t cfgVal)
return 0; return 0;
} }
int gpioCfgInternals(unsigned cfgWhat, unsigned cfgVal)
{
int retVal = PI_BAD_CFG_INTERNAL;
DBG(DBG_USER, "cfgWhat=%u, cfgVal=%d", cfgWhat, cfgVal);
switch(cfgWhat)
{
case 562484977:
if (cfgVal) gpioCfg.internals |= PI_CFG_STATS;
else gpioCfg.internals &= (~PI_CFG_STATS);
DBG(DBG_ALWAYS, "show stats is %u", cfgVal);
retVal = 0;
break;
case 984762879:
if ((cfgVal >= DBG_ALWAYS) && (cfgVal <= DBG_MAX_LEVEL))
{
gpioCfg.dbgLevel = cfgVal;
gpioCfg.internals = (gpioCfg.internals & (~0xF)) | cfgVal;
DBG(DBG_ALWAYS, "Debug level is %u", cfgVal);
retVal = 0;
}
break;
}
return retVal;
}
/* include any user customisations */ /* include any user customisations */

View File

@ -106,6 +106,15 @@ return error PI_NOT_INITIALISED.
If the library is initialised the [*gpioCfg**] functions will return If the library is initialised the [*gpioCfg**] functions will return
error PI_INITIALISED. error PI_INITIALISED.
If you intend to rely on signals sent to your application, you should
turn off the internal signal handling as show in this example:
. .
int cfg = gpioCfgGetInternals();
cfg |= PI_CFG_NOSIGHANDLER; // (1<<10)
gpioCfgSetInternals(cfg);
int status = gpioInitialise();
. .
TEXT*/ TEXT*/
/*OVERVIEW /*OVERVIEW
@ -377,7 +386,6 @@ gpioCfgSocketPort Configure socket port
gpioCfgMemAlloc Configure DMA memory allocation mode gpioCfgMemAlloc Configure DMA memory allocation mode
gpioCfgNetAddr Configure allowed network addresses gpioCfgNetAddr Configure allowed network addresses
gpioCfgInternals Configure misc. internals (DEPRECATED)
gpioCfgGetInternals Get internal configuration settings gpioCfgGetInternals Get internal configuration settings
gpioCfgSetInternals Set internal configuration settings gpioCfgSetInternals Set internal configuration settings
@ -4975,18 +4983,6 @@ numSockAddr: 0-256 (0 means all addresses allowed)
D*/ D*/
/*F*/
int gpioCfgInternals(unsigned cfgWhat, unsigned cfgVal);
/*D
Used to tune internal settings.
. .
cfgWhat: see source code
cfgVal: see source code
. .
D*/
/*F*/ /*F*/
uint32_t gpioCfgGetInternals(void); uint32_t gpioCfgGetInternals(void);
/*D /*D
@ -5003,6 +4999,7 @@ settings.
. . . .
cfgVal: see source code cfgVal: see source code
. . . .
D*/ D*/