-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved Linux GPIO Driver Using Chardev #2943
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A few comments/recommendations, but not blocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few comments
namespace Drv { | ||
|
||
|
||
Os::File::Status errno_to_file_status(PlatformIntType errno_input) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
return status; | ||
} | ||
|
||
Drv::GpioStatus errno_to_gpio_status(PlatformIntType errno_input) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
return status; | ||
} | ||
|
||
U32 configuration_to_handler_flags(Drv::LinuxGpioDriver::GpioConfiguration configuration) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
return flags; | ||
} | ||
|
||
U32 configuration_to_event_flags(Drv::LinuxGpioDriver::GpioConfiguration configuration) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
// Handler implementations for user-defined typed input ports | ||
// ---------------------------------------------------------------------- | ||
|
||
Os::File::Status LinuxGpioDriver ::setupLineHandle(const PlatformIntType chip_descriptor, |
Check notice
Code scanning / CodeQL
Long function without assertion Note
return status; | ||
} | ||
|
||
Drv::GpioStatus LinuxGpioDriver ::gpioRead_handler(const NATIVE_INT_TYPE portNum, Fw::Logic& state) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
return status; | ||
} | ||
|
||
Drv::GpioStatus LinuxGpioDriver ::gpioWrite_handler(const NATIVE_INT_TYPE portNum, const Fw::Logic& state) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
return status; | ||
} | ||
|
||
void LinuxGpioDriver ::pollLoop() { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
// Construction, initialization, and destruction | ||
// ---------------------------------------------------------------------- | ||
|
||
LinuxGpioDriver ::LinuxGpioDriver(const char* const compName) : LinuxGpioDriverComponentBase(compName) {} |
Check notice
Code scanning / CodeQL
More than one statement per line Note
|
||
LinuxGpioDriver ::LinuxGpioDriver(const char* const compName) : LinuxGpioDriverComponentBase(compName) {} | ||
|
||
Drv::GpioStatus LinuxGpioDriver ::start(const FwSizeType priority, |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* Fixing LedBlinker workshop for new GPIO driver * Fixing UT breakage --------- Co-authored-by: Michael D Starch <[email protected]>
Change Description