Skip to content
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

Unable to unset Pin assignment #152

Open
GoogleCodeExporter opened this issue Jul 31, 2015 · 1 comment
Open

Unable to unset Pin assignment #152

GoogleCodeExporter opened this issue Jul 31, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.setpin to pin 28
2.unset pin?

Alternate
1. setpin to pin 28 (valid pin)
2. setpin to pin 32 (only 31 pins on chip)


What is the expected output? What do you see instead?
I have a pin that i would like to toggle function.  if &m2_null_element, it 
functions one way.  if in menus, it functions as select.  So i need to set and 
unset the pin assignment.  RIght now no way to do that.  I have to set to an 
unused pin, however I have a scenario where no extra pin will be available.

In the alternate scenario, I cant get into the menus (crash of sorts)

I would like either an "unsetpin" command, or to be able to 
m2.setPin(M2_KEY_SELECT, null);

Original issue reported on code.google.com by [email protected] on 9 Jun 2015 at 3:46

@GoogleCodeExporter
Copy link
Author

ok, so far noone has requested such a function.
Maybe add the following function to the end of m2pin.c

void m2_UnsetPin(uint8_t key)
{
  m2_key_to_pin_array[idx].status &= ~M2_IS_KEY_ASSIGNED;
}

calling this function may solve proproblem, but i have not tested this.



Original comment by [email protected] on 9 Jun 2015 at 6:47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant