sdio.h
Go to the documentation of this file.
1 /*
2  * KubOS HAL
3  * Copyright (C) 2016 Kubos Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
27 #ifdef YOTTA_CFG_HARDWARE_SDIO
28 #ifndef K_SDIO_H
29 #define K_SDIO_H
30 
31 #include <stdint.h>
32 
33 typedef enum
34 {
40 } KSDIOStatus;
41 
42 typedef struct
43 {
44  uint32_t capacity;
46 
47 
48 // Public HAL interface
49 
51 
52 void k_sdio_terminate();
53 
54 KSDIOStatus k_sdio_write_blocks(uint32_t * buffer, uint64_t addr, uint32_t block_size, uint32_t count);
55 
56 KSDIOStatus k_sdio_read_blocks(uint32_t * buffer, uint64_t addr, uint32_t block_size, uint32_t count);
57 
59 
61 
62 // Private hardware specific interfaces
63 
65 
66 void kprv_sdio_terminate();
67 
68 KSDIOStatus kprv_sdio_write_blocks(uint32_t * buffer, uint64_t addr, uint32_t block_size, uint32_t count);
69 
70 KSDIOStatus kprv_sdio_read_blocks(uint32_t * buffer, uint64_t addr, uint32_t block_size, uint32_t count);
71 
73 
75 
76 #endif
77 #endif
uint32_t capacity
Definition: sdio.h:44
k_sdio_card_info_t k_sdio_card_info()
Definition: sdio.h:39
void kprv_sdio_terminate()
KSDIOStatus
Definition: sdio.h:33
KSDIOStatus kprv_sdio_card_status()
KSDIOStatus kprv_sdio_write_blocks(uint32_t *buffer, uint64_t addr, uint32_t block_size, uint32_t count)
Definition: sdio.h:37
Definition: sdio.h:38
Definition: sdio.h:35
KSDIOStatus k_sdio_write_blocks(uint32_t *buffer, uint64_t addr, uint32_t block_size, uint32_t count)
KSDIOStatus k_sdio_read_blocks(uint32_t *buffer, uint64_t addr, uint32_t block_size, uint32_t count)
KSDIOStatus kprv_sdio_init()
Definition: sdio.h:42
k_sdio_card_info_t kprv_sdio_card_info()
KSDIOStatus kprv_sdio_read_blocks(uint32_t *buffer, uint64_t addr, uint32_t block_size, uint32_t count)
KSDIOStatus k_sdio_card_status()
void k_sdio_terminate()
Definition: sdio.h:36
KSDIOStatus k_sdio_init()