bsio.h
来自「此程序为GPS接收机的源码」· C头文件 代码 · 共 46 行
H
46 行
// bsio.h: Header file for the bsio.c file// Copyright (C) 2005 Andrew Greenberg// Distributed under the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 (June 1991).// See the "COPYING" file distributed with this software for more information.#ifndef __BSIO_H#define __BSIO_Htypedef enum { SPI_MODE_0 = 0, SPI_MODE_1 = 1, SPI_MODE_2 = 2, SPI_MODE_3 = 3} spi_mode;typedef struct { unsigned long int write_errors; unsigned long int read_errors;} bsio_errors;cyg_bool bsio_initialize(spi_mode mode, int clock_freq);cyg_bool bsio_write(int chip_select, long int control_word, int control_length, char *write1_data, int write1_length, char *write_data, int write_length);cyg_bool bsio_read(int chip_select, long int control_word, int control_length, char *write1_data, int write1_length, char *read_data, int read_length);cyg_bool bsio_write_read(int chip_select, long int control_word, int control_length, char *write1_data, int write1_length, char *write_data, int write_length, char *read_data, int read_length);bsio_errors* bsio_get_error_counts(void);void bsio_reset_error_counts(void);#endif // __BSIO_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?