-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from MEGA65/reduce-warnings
Add tests to cc65 build as well as fileio test
- Loading branch information
Showing
25 changed files
with
376 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# PRG files | ||
*.prg | ||
tests/*.prg | ||
|
||
# Prerequisites | ||
*.d | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#ifndef __MEGA65_DEBUG_H | ||
#define __MEGA65_DEBUG_H | ||
|
||
void debug_msg(char* m); | ||
/** | ||
* @brief Write debug message to serial monitor | ||
* @param msg Text message to write | ||
*/ | ||
void debug_msg(char* msg); | ||
|
||
#endif // __MEGA65_DEBUG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,46 @@ | ||
#ifndef __MEGA65_FILEIO_H | ||
#define __MEGA65_FILEIO_H | ||
|
||
void toggle_rom_write_protect(); | ||
#include <stdint.h> | ||
#include <stddef.h> | ||
|
||
void toggle_rom_write_protect(void); | ||
|
||
/** Closes all open files */ | ||
void closeall(void); | ||
void close(unsigned char fd); | ||
|
||
// Returns file descriptor | ||
unsigned char open(char* filename); | ||
/** | ||
* @brief Close a single file | ||
* @param fd File descriptor pointing to file to close | ||
*/ | ||
void close(uint8_t fd); | ||
|
||
/** | ||
* @brief Open file | ||
* @param filename to open | ||
* @return File descriptor or `0xff` if error | ||
*/ | ||
uint8_t open(char* filename); | ||
|
||
// Read upto one sector of data into the supplied buffer. | ||
// Returns the number of bytes actually read. | ||
unsigned short read512(unsigned char* buffer); | ||
/** | ||
* @brief Read up to 512 bytes from file | ||
* @param buffer Input buffer | ||
* @return Number of bytes read | ||
*/ | ||
size_t read512(uint8_t* buffer); | ||
|
||
// Change working directory | ||
// (only accepts one directory segment at a time | ||
unsigned char chdir(char* filename); | ||
/** | ||
* @brief Change working directory | ||
* @param filename Directory name | ||
* @return Error code (currently unused) | ||
* @note Only accepts one directory segment at a time | ||
*/ | ||
uint8_t chdir(char* filename); | ||
|
||
// Change working directory to the root directory | ||
unsigned char chdirroot(void); | ||
/** | ||
* @brief Change working directory to the root directory | ||
* @return Error code (currently unused) | ||
*/ | ||
uint8_t chdirroot(void); | ||
|
||
#endif // __MEGA65_FILEIO_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.