blob: e7dfae481ee6421eaaee88394c0c4c05e14fdb76 (
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
36
37
38
39
40
41
42
|
/* Copyright 2019 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.
*
* Dummy SPI Controller driver for unit test.
*/
#include <stdint.h>
#include "common.h"
#include "gpio.h"
#include "spi.h"
test_mockable int spi_enable(int port, int enable)
{
return EC_SUCCESS;
}
test_mockable int spi_transaction(const struct spi_device_t *spi_device,
const uint8_t *txdata, int txlen,
uint8_t *rxdata, int rxlen)
{
return EC_SUCCESS;
}
test_mockable int spi_transaction_async(const struct spi_device_t *spi_device,
const uint8_t *txdata, int txlen,
uint8_t *rxdata, int rxlen)
{
return EC_SUCCESS;
}
test_mockable int spi_transaction_flush(const struct spi_device_t *spi_device)
{
return EC_SUCCESS;
}
test_mockable int spi_transaction_wait(const struct spi_device_t *spi_device)
{
return EC_SUCCESS;
}
|