aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdriver
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-09-17 09:33:07 +1000
committerinmarket <andrewh@inmarket.com.au>2014-09-17 09:33:07 +1000
commit16fbcdc0b5b73024ab0f41b7d505f3265bf136f0 (patch)
tree2403ee8cae95609cf09ac2ece2aa1f75a70d50a1 /src/gdriver
parentc28c4645c0a1fb6f298e5ca2e8e843991b6adaef (diff)
downloaduGFX-16fbcdc0b5b73024ab0f41b7d505f3265bf136f0.tar.gz
uGFX-16fbcdc0b5b73024ab0f41b7d505f3265bf136f0.tar.bz2
uGFX-16fbcdc0b5b73024ab0f41b7d505f3265bf136f0.zip
Convert GDRIVER instance numbers to unsigned.
Diffstat (limited to 'src/gdriver')
-rw-r--r--src/gdriver/gdriver_gdriver.c14
-rw-r--r--src/gdriver/sys_defs.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gdriver/gdriver_gdriver.c b/src/gdriver/gdriver_gdriver.c
index 90a1d932..0a53aaf7 100644
--- a/src/gdriver/gdriver_gdriver.c
+++ b/src/gdriver/gdriver_gdriver.c
@@ -34,9 +34,9 @@ void _gdriverDeinit(void) {
GDriver *gdriverRegister(const GDriverVMT *vmt) {
- GDriver *pd;
- GDriver *dtail;
- int dinstance, sinstance;
+ GDriver * pd;
+ GDriver * dtail;
+ unsigned dinstance, sinstance;
// Loop to find the driver instance and the system instance numbers
dinstance = sinstance = 0;
@@ -98,9 +98,9 @@ void gdriverUnRegister(GDriver *driver) {
gfxFree(driver);
}
-GDriver *gdriverGetInstance(uint16_t type, int instance) {
+GDriver *gdriverGetInstance(uint16_t type, unsigned instance) {
GDriver *pd;
- int sinstance;
+ unsigned sinstance;
// Loop to find the system instance
sinstance = 0;
@@ -114,9 +114,9 @@ GDriver *gdriverGetInstance(uint16_t type, int instance) {
return 0;
}
-int gdriverInstanceCount(uint16_t type) {
+unsigned gdriverInstanceCount(uint16_t type) {
GDriver *pd;
- int sinstance;
+ unsigned sinstance;
// Loop to count the system instances
sinstance = 0;
diff --git a/src/gdriver/sys_defs.h b/src/gdriver/sys_defs.h
index 7f50fc6d..546246de 100644
--- a/src/gdriver/sys_defs.h
+++ b/src/gdriver/sys_defs.h
@@ -67,7 +67,7 @@ typedef struct GDriverVMT {
uint16_t type; // @< What type of driver this is
uint16_t flags; // @< Flags for the driver. Meaning is specific to each driver type.
uint32_t objsize; // @< How big the runtime driver structure is
- bool_t (*init)(GDriver *driver, int driverinstance, int systeminstance); // @< Initialise the driver. Returns TRUE if OK.
+ bool_t (*init)(GDriver *driver, unsigned driverinstance, unsigned systeminstance); // @< Initialise the driver. Returns TRUE if OK.
// driverinstance is the instance 0..n of this driver.
// systeminstance is the instance 0..n of this type of device.
void (*postinit)(GDriver *driver); // @< Called once the driver is registered.
@@ -118,7 +118,7 @@ extern "C" {
* @param[in] type The type of driver to find
* @param[in] instance The instance (0..n) to find
*/
- GDriver *gdriverGetInstance(uint16_t type, int instance);
+ GDriver *gdriverGetInstance(uint16_t type, unsigned instance);
/**
* @brief Get the count of instances of a type of device
@@ -128,7 +128,7 @@ extern "C" {
*
* @param[in] type The type of driver to find
*/
- int gdriverInstanceCount(uint16_t type);
+ unsigned gdriverInstanceCount(uint16_t type);
/**
* @brief Get the next driver for a type of device