Browse Source

Merge pull request #1 from zxmarcos/master

lcdFree
pull/54/head
cail 7 years ago
committed by GitHub
parent
commit
c0425001b8
2 changed files with 18 additions and 0 deletions
  1. +16
    -0
      devLib/lcd.c
  2. +2
    -0
      devLib/lcd.h

+ 16
- 0
devLib/lcd.c View File

@@ -498,3 +498,19 @@ int lcdInit (const int rows, const int cols, const int bits,

return lcdFd ;
}


/*
* lcdFree:
* Free a LCD handle.
*********************************************************************************
*/

void lcdFree (const int fd)
{
if ((fd >= 0) && (fd < MAX_LCDS))
{
free(lcds[fd]);
lcds[fd] = NULL;
}
}

+ 2
- 0
devLib/lcd.h View File

@@ -47,6 +47,8 @@ extern int lcdInit (const int rows, const int cols, const int bits,
const int d0, const int d1, const int d2, const int d3, const int d4,
const int d5, const int d6, const int d7);

extern void lcdFree (const int fd);

#ifdef __cplusplus
}
#endif

Loading…
Cancel
Save