segment_driver.h

来自「一个简单的小型操作系统」· C头文件 代码 · 共 82 行

H
82
字号

/*****************************************************************************
 * 
 * Module      : segment_driver.h
 * Description : low level SEGMENT device driver
 * OS          : SLOS 0.09
 * Platform    : e7t
 * History     : 
 *
 * 25th November 2001 Andrew N. Sloss
 * - Example simple Device driver by Chris Wright's 
 *   specification
 *
 *****************************************************************************/

/* -- segment_init ------------------------------------------------------------
 *
 * Description : initalize the SEGMENT device driver internal 
 *               data structures and hardware. Set the SEGMENT 
 *               to display zero.
 * 
 * Parameters  : none...
 * Return      : none...
 * Notes       : none...
 *
 */

void segment_init(void);

/* -- segment_open ------------------------------------------------------------
 *
 * Description : open the segment display  
 * 
 * Parameters  : unsigned device = DEVICE_SEGMENT_E7T
 *             : unsigned ignored - for this device
 * Return      : UID -
 * Notes       : 
 *
 */

UID segment_open(unsigned device,unsigned ignored);

/* -- segment_close -----------------------------------------------------------
 *
 * Description : example open on the segment 
 * 
 * Parameters  : UID id = DEVICE_SEGMENT_E7T 
 * Return      : 
 *   DEVICE_SUCCESS - successfully close the device
 *   DEVICE_UNKNOWN - couldn't identify the UID
 * Notes       : 
 *
 */

int segment_close(UID id);

/* -- segment_write_byte ------------------------------------------------------
 *
 * Description : write a byte 
 * 
 * Parameters  : UID id
 *             : BYTE segment = 0-9 
 * Return      : none...
 *
 * Notes       : 
 */

void segment_write_byte(UID id,BYTE segment);

/* -- segment_read_byte -------------------------------------------------------
 *
 * Description : read a byte value 
 * 
 * Parameters  : UID id
 * Return      : BYTE value 0-9 
 *
 * Notes       : an example of a led read bit
 */

BYTE segment_read_byte(UID id);

⌨️ 快捷键说明

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