Skip to content

Commit

Permalink
Remove deprecated gpioCfgInternals API. Fix issue #341.
Browse files Browse the repository at this point in the history
  • Loading branch information
guymcswain committed Jun 27, 2020
1 parent 1c5b27f commit d7379ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 52 deletions.
Binary file modified DOC/dbase/pigpio.sqlite
Binary file not shown.
2 changes: 1 addition & 1 deletion DOC/src/defs/pigs.def
Original file line number Diff line number Diff line change
Expand Up @@ -2610,7 +2610,7 @@ $ pigs wvas 7 38400 8 2 0 0x41 0x42
WVTAT ::

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
values:
Expand Down
38 changes: 0 additions & 38 deletions pigpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -14002,44 +14002,6 @@ int gpioCfgSetInternals(uint32_t cfgVal)
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 */

Expand Down
23 changes: 10 additions & 13 deletions pigpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ return error PI_NOT_INITIALISED.
If the library is initialised the [*gpioCfg**] functions will return
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*/

/*OVERVIEW
Expand Down Expand Up @@ -377,7 +386,6 @@ gpioCfgSocketPort Configure socket port
gpioCfgMemAlloc Configure DMA memory allocation mode
gpioCfgNetAddr Configure allowed network addresses
gpioCfgInternals Configure misc. internals (DEPRECATED)
gpioCfgGetInternals Get internal configuration settings
gpioCfgSetInternals Set internal configuration settings
Expand Down Expand Up @@ -4975,18 +4983,6 @@ numSockAddr: 0-256 (0 means all addresses allowed)
D*/


/*F*/
int gpioCfgInternals(unsigned cfgWhat, unsigned cfgVal);
/*D
Used to tune internal settings.
. .
cfgWhat: see source code
cfgVal: see source code
. .
D*/


/*F*/
uint32_t gpioCfgGetInternals(void);
/*D
Expand All @@ -5003,6 +4999,7 @@ settings.
. .
cfgVal: see source code
. .
D*/


Expand Down

0 comments on commit d7379ba

Please sign in to comment.