⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gpio.h

📁 U盘控制器USB97C223的固件代码,对2kPAGE NAND FLASH 有很好的支持.
💻 H
字号:
/*============================================================================
  ____________________________________________________________________________
                                ______________________________________________
   SSSS  M   M          CCCC          Standard Microsystems Corporation
  S      MM MM   SSSS  C                    Austin Design Center
   SSS   M M M  S      C                 11000 N. Mopac Expressway
      S  M   M   SSS   C                Stonelake Bldg. 6, Suite 500
  SSSS   M   M      S   CCCC                Austin, Texas 78759
                SSSS            ______________________________________________
  ____________________________________________________________________________

  Copyright(C) 1999, Standard Microsystems Corporation
  All Rights Reserved.

  This program code listing is proprietary to SMSC and may not be copied,
  distributed, or used without a license to do so.  Such license may have
  Limited or Restricted Rights. Please refer to the license for further
  clarification.
  ____________________________________________________________________________

  Notice: The program contained in this listing is a proprietary trade
  secret of SMSC, Hauppauge, New York, and is copyrighted
  under the United States Copyright Act of 1976 as an unpublished work,
  pursuant to Section 104 and Section 408 of Title XVII of the United
  States code. Unauthorized copying, adaption, distribution, use, or
  display is prohibited by this law.
  ____________________________________________________________________________

  Use, duplication, or disclosure by the Government is subject to
  restrictions as set forth in subparagraph(c)(1)(ii) of the Rights
  in Technical Data and Computer Software clause at DFARS 52.227-7013.
  Contractor/Manufacturer is Standard Microsystems Corporation,
  80 Arkay Drive, Hauppauge, New York, 1178-8847.
  ____________________________________________________________________________
  ____________________________________________________________________________

  <module name> - <module description>
  ____________________________________________________________________________

  comments tbd
  ____________________________________________________________________________

  Revision History
  Date      Who  Comment
  ________  ___  _____________________________________________________________
  03/15/01  tbh  -initial version
  10/18/01  tbh  -added gpio_togglebit()
  07/02/03  ds   added macro to sense Vbus.
============================================================================*/

// constants
#define kbm_gpio_dir_in  0
#define kbm_gpio_dir_out 1

#ifdef k_mcu_97243
#define _gpio_sense_vbus() ((_mcu_register_rd(x_gpioa_in) & kbm_gpio6) ? k_true : k_false)
#else
#define _gpio_sense_vbus() ((_mcu_register_rd(x_gpioa_in) & kbm_gpio3) ? k_true : k_false)
#endif
// prototypes
void gpio_initialize(void) reentrant;
t_bit_mask gpio_rd_dir(void) reentrant;
void gpio_wr_dir(t_bit_mask bitmsk) reentrant;
void gpio_bit_is_input(t_bit_ix bitix) reentrant;
void gpio_bit_is_output(t_bit_ix bitix) reentrant;
t_datum gpio_rd(void) reentrant;
void gpio_wr(t_datum datum) reentrant;
void gpio_setbit(t_bit_ix bitix) reentrant;
void gpio_clrbit(t_bit_ix bitix) reentrant;
void gpio_togglebit(t_bit_ix bitix) reentrant;
void gpio_set_bits(t_bit_mask bitmsk) reentrant;
void gpio_clr_bits(t_bit_mask bitmsk) reentrant;

//---eof------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -