summaryrefslogtreecommitdiff
path: root/chip/mchp/gpspi_chip.h
blob: 529a727e36cfb38d8b6ea3c21130ef015a9b4484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* Copyright 2017 The Chromium OS Authors. All rights reserved
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * Register map for MCHP MEC processor
 */
/** @file gpspi_chip.h
 *MCHP MEC General Purpose SPI Master
 */
/** @defgroup MCHP MEC gpspi
 */

#ifndef _GPSPI_CHIP_H
#define _GPSPI_CHIP_H

#include <stdint.h>
#include <stddef.h>

/* struct spi_device_t */
#include "spi.h"

int gpspi_transaction_flush(const struct spi_device_t *spi_device);

int gpspi_transaction_wait(const struct spi_device_t *spi_device);

int gpspi_transaction_async(const struct spi_device_t *spi_device,
				const uint8_t *txdata, int txlen,
				uint8_t *rxdata, int rxlen);

int gpspi_enable(int port, int enable);

#endif /* #ifndef _GPSPI_CHIP_H */
/**   @}
 */