Hey. Just look at the codes and give an advice please.
and here is problem...Code:BOOL checkPortNum(U32 port) { if(port < 0 || port > 4) { return (ERROR); } else{ return (SUCCESS); } } BOOL checkPinNum(U32 pin) { if(pin < 0 || pin > 0xFFFFFFFF) { return (ERROR); } else{ return (SUCCESS); }
Code:PUBLIC void drvGpioDirection(U32 port, U32 pin, PinDirection direction) { if (checkPort(port) && checkPin(pin)) { GPIO_SetDir(port, pin, direction); } else WHAT??? }