drv_common.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2017 C-SKY Microsystems Co., Ltd. All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /******************************************************************************
  17. * @file drv_common.h
  18. * @brief Header File for Common Driver
  19. * @version V1.0
  20. * @date 02. June 2017
  21. ******************************************************************************/
  22. #ifndef _DRV_COMMON_H_
  23. #define _DRV_COMMON_H_
  24. #include <stdint.h>
  25. #include <drv_errno.h>
  26. #include "config.h"
  27. /** pin definition */
  28. typedef int32_t pin_t;
  29. /// \details driver handle
  30. typedef void *drv_handle_t;
  31. /**
  32. \brief General power states
  33. */
  34. typedef enum {
  35. DRV_POWER_OFF, ///< Power off: no operation possible
  36. DRV_POWER_LOW, ///< Low Power mode: retain state, detect and signal wake-up events
  37. DRV_POWER_FULL ///< Power on: full operation at maximum performance
  38. } drv_power_stat_e;
  39. #endif /* _DRV_COMMON_H */