gpio_api.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //------------------------------------------------------------------------------
  2. // <copyright file="gpio_api.h" company="Atheros">
  3. // Copyright (c) 2004-2008 Atheros Corporation. All rights reserved.
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License version 2 as
  7. // published by the Free Software Foundation;
  8. //
  9. // Software distributed under the License is distributed on an "AS
  10. // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  11. // implied. See the License for the specific language governing
  12. // rights and limitations under the License.
  13. //
  14. //
  15. //------------------------------------------------------------------------------
  16. //==============================================================================
  17. // Host-side General Purpose I/O API.
  18. //
  19. // Author(s): ="Atheros"
  20. //==============================================================================
  21. #ifndef _GPIO_API_H_
  22. #define _GPIO_API_H_
  23. /*
  24. * Send a command to the Target in order to change output on GPIO pins.
  25. */
  26. A_STATUS wmi_gpio_output_set(struct wmi_t *wmip,
  27. A_UINT32 set_mask,
  28. A_UINT32 clear_mask,
  29. A_UINT32 enable_mask,
  30. A_UINT32 disable_mask);
  31. /*
  32. * Send a command to the Target requesting input state of GPIO pins.
  33. */
  34. A_STATUS wmi_gpio_input_get(struct wmi_t *wmip);
  35. /*
  36. * Send a command to the Target to change the value of a GPIO register.
  37. */
  38. A_STATUS wmi_gpio_register_set(struct wmi_t *wmip,
  39. A_UINT32 gpioreg_id,
  40. A_UINT32 value);
  41. /*
  42. * Send a command to the Target to fetch the value of a GPIO register.
  43. */
  44. A_STATUS wmi_gpio_register_get(struct wmi_t *wmip, A_UINT32 gpioreg_id);
  45. /*
  46. * Send a command to the Target, acknowledging some GPIO interrupts.
  47. */
  48. A_STATUS wmi_gpio_intr_ack(struct wmi_t *wmip, A_UINT32 ack_mask);
  49. #endif /* _GPIO_API_H_ */