Project

General

Profile

Revision 891

Moved comments to headers. That was painful.

View differences:

spi.c
14 14
static spi_fun_recv_t spi_recv_func; /* byte handler */
15 15
static spi_fun_recv_complete_t spi_recv_complete_func; /*transmission completion handler */
16 16

  
17
/** 
18
* @brief Initialize SPI hardware for communication.
19
* 
20
* @param recv_func The function to be called for each byte of data received.
21
* @param recv_complete_func  The function to be called at the end of a complete transmission.
22
*/
23 17
void spi_init (spi_fun_recv_t recv_func, spi_fun_recv_complete_t recv_complete_func)
24 18
{
25 19
    /*  Enable Interrupt, Enable SPI Module, MSB First, Master Mode, Clock div = 64 */
......
40 34
    //usb_puts("\tspi.c Debug: SPI INITIALIZED\n");
41 35
}
42 36

  
43
/** 
44
* @brief Transfer a given byte to slave and receive a byte 
45
* 
46
* @param bytes The number of bytes to be transferred.
47
**/
48 37
void spi_transfer(char bytes)
49 38
{
50 39
    spi_bytes = bytes;

Also available in: Unified diff