Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
sdcard.c
Go to the documentation of this file.
1 /* The Xemu project.
2  Copyright (C)2016-2019 LGB (Gábor Lénárt) <lgblgblgb@gmail.com>
3 
4  This is the Commander X16 emulation. Note: the source is overcrowded with comments by intent :)
5  That it can useful for other people as well, or someone wants to contribute, etc ...
6 
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
20 
21 #include "xemu/emutools.h"
22 //#include "xemu/emutools_files.h"
23 #include "sdcard.h"
24 
25 static int sd_selected = 0;
26 static int select_line_transitions = 0;
27 
28 
29 void sdcard_spi_select ( int select )
30 {
31  if (select != sd_selected) {
32  sd_selected = select;
33  select_line_transitions++;
34  DEBUGPRINT("SDCARD: select line goes to %s (#%d)" NL, select ? "high" : "low", select_line_transitions);
35  }
36 }
37 
38 
40 {
41  DEBUGPRINT("SDCARD: initiated SPI transfer, MOSI=$%02X" NL, data);
42  return 0xFF;
43 }
emutools.h
sdcard_spi_transfer
Uint8 sdcard_spi_transfer(Uint8 data)
Definition: sdcard.c:39
m65-memcontent-generator.data
data
Definition: m65-memcontent-generator.py:119
Uint8
uint8_t Uint8
Definition: fat32.c:51
DEBUGPRINT
#define DEBUGPRINT(...)
Definition: emutools_basicdefs.h:171
NL
#define NL
Definition: fat32.c:37
sdcard.h
sdcard_spi_select
void sdcard_spi_select(int select)
Definition: sdcard.c:29