-
Notifications
You must be signed in to change notification settings - Fork 0
machine.Pin constructor (make) + init #21
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
base: machine-pin
Are you sure you want to change the base?
Conversation
Signed-off-by: jaenrig-ifx <[email protected]>
Signed-off-by: jaenrig-ifx <[email protected]>
Signed-off-by: jaenrig-ifx <[email protected]>
Signed-off-by: jaenrig-ifx <[email protected]>
Signed-off-by: jaenrig-ifx <[email protected]>
0bfb772 to
cf20f87
Compare
Signed-off-by: jaenrig-ifx <[email protected]>
|
|
||
| pin1_name = "P16_0" | ||
|
|
||
| pin_out = Pin(pin1_name, mode=Pin.OUT, value=True) |
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.
So the other tests will be added after pin generations is it?
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.
I will start the test with 2 hardcoded pins, and add the rest of the machine.Pin() tests. With the creation of the pin class I will understand all the machine_pin_obj requirements, and from there I can handle the pin generation from make-pins.py.
Then there are the alternative functions, which some ports handle them from the Pin class... In PSOC6 the usage of the HAL prevented us from doing this. But in this case, I am not sure if we can/should stick to that approach.
|
|
||
| mp_arg_check_num(n_args, n_kw, 1, 6, true); | ||
|
|
||
| const machine_pin_obj_t *self = &machine_pin_p16_0; // TODO: This will be change by the proper pin allocation/find function machine_pin_finf(args[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.
Can we instead have a LUT for this pin so that we can extend it for other tests till we have pins generated?
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.
Let´s discuss in the pairing how I should do that :)
NikhitaR-IFX
left a comment
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 so far 👏
machine.Pinclass tomachinemodulemachine.Pin()mode,pullandvalueconfigurations