-
Notifications
You must be signed in to change notification settings - Fork 68
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
Init: setup unity and code confg file for builtin library #297
base: master
Are you sure you want to change the base?
Conversation
- add unity setup in CAN lib, include makefiles take unity from local install path - code check files such like cpp checheck, clang-tidy and so on - format CAN lib with clang-format
d7796f6
to
e881454
Compare
Temporary documentation: IFX_CONTRIBUTING.md |
libraries/CAN/src/CANXMC.cpp
Outdated
int CANXMC::wakeup() { | ||
CAN_xmc->CLC &= ~CAN_CLC_EDIS_Msk; | ||
if (CAN_xmc->CLC & CAN_CLC_EDIS_Msk == 0) { | ||
return 1; |
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.
A more elegant way - my opinion - uses this macro (part of std C/C++) :
return (CAN_xmc->CLC & CAN_CLC_EDIS_Msk == 0 ? 1 : 0);
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.
elegant, I changed it
void testSendReceive() | ||
{ | ||
|
||
CAN.beginPacket(CAN_ID_1); |
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.
The CAN function return value is still not checked. More of these below.
@@ -0,0 +1,27 @@ | |||
// std includes |
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.
This file was generated by me, right ? Is it still needed ?
@@ -0,0 +1,44 @@ | |||
// std includes |
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.
You may even merge the related files under arduino, features and corelibs as everything is taking place in the same environment. This was different for the 3D magnetic library : the tests had to be independent of of Arduino functionality in order to be reusable for MTB. But here separating the directories does not make sense, all is taking place in Arduino.
This will also allow you to better test the code currently in the arduino/corelibs directory.
@@ -0,0 +1,78 @@ | |||
// std includes | |||
|
|||
// test includes |
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.
File no longer required ?
By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---
CONTRIBUTING.md also tells you what to expect in the PR process.
Description
Init unity setup and code check configuration
Related Issue
/DESMAKERS-3927
Context
Just starting point, no need to merge now