Convert GDRIVER instance numbers to unsigned.
This commit is contained in:
parent
c28c4645c0
commit
16fbcdc0b5
2 changed files with 10 additions and 10 deletions
|
@ -36,7 +36,7 @@ void _gdriverDeinit(void) {
|
|||
GDriver *gdriverRegister(const GDriverVMT *vmt) {
|
||||
GDriver * pd;
|
||||
GDriver * dtail;
|
||||
int dinstance, sinstance;
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue