-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Examples): Update examples with CLI to use new CLI library (#…
…770) Co-authored-by: Jacob-Scheiffler <[email protected]>
- Loading branch information
1 parent
62fe201
commit bfabe6f
Showing
21 changed files
with
1,575 additions
and
1,747 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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/****************************************************************************** | ||
* Copyright (C) 2023 Maxim Integrated Products, Inc., All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES | ||
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* Except as contained in this notice, the name of Maxim Integrated | ||
* Products, Inc. shall not be used except as stated in the Maxim Integrated | ||
* Products, Inc. Branding Policy. | ||
* | ||
* The mere transfer of this software does not imply any licenses | ||
* of trade secrets, proprietary technology, copyrights, patents, | ||
* trademarks, maskwork rights, or any other form of intellectual | ||
* property whatsoever. Maxim Integrated Products, Inc. retains all | ||
* ownership rights. | ||
* | ||
******************************************************************************/ | ||
|
||
#ifndef EXAMPLES_MAX32650_SDHC_FAT_INCLUDE_SDHC_EXAMPLE_H_ | ||
#define EXAMPLES_MAX32650_SDHC_FAT_INCLUDE_SDHC_EXAMPLE_H_ | ||
|
||
int sdhc_init(void); | ||
|
||
void generateMessage(unsigned length); | ||
|
||
int mount(); | ||
|
||
int umount(); | ||
|
||
int formatSDHC(); | ||
|
||
int getSize(); | ||
|
||
int ls(); | ||
|
||
int createFile(char *file_name, unsigned int length); | ||
|
||
int appendFile(char *file_name, unsigned int length); | ||
|
||
int mkdir(char *dir_name); | ||
|
||
int cd(char *dir_name); | ||
|
||
int deleteFile(char *file_name); | ||
|
||
int example(); | ||
|
||
void waitCardInserted(); | ||
|
||
#endif // EXAMPLES_MAX32650_SDHC_FAT_INCLUDE_SDHC_EXAMPLE_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/****************************************************************************** | ||
* Copyright (C) 2023 Maxim Integrated Products, Inc., All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES | ||
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
* | ||
* Except as contained in this notice, the name of Maxim Integrated | ||
* Products, Inc. shall not be used except as stated in the Maxim Integrated | ||
* Products, Inc. Branding Policy. | ||
* | ||
* The mere transfer of this software does not imply any licenses | ||
* of trade secrets, proprietary technology, copyrights, patents, | ||
* trademarks, maskwork rights, or any other form of intellectual | ||
* property whatsoever. Maxim Integrated Products, Inc. retains all | ||
* ownership rights. | ||
* | ||
******************************************************************************/ | ||
|
||
#ifndef EXAMPLES_MAX32650_SDHC_FAT_INCLUDE_USER_CLI_H_ | ||
#define EXAMPLES_MAX32650_SDHC_FAT_INCLUDE_USER_CLI_H_ | ||
|
||
/* -------------------------------------------------- */ | ||
// GLOBAL VARIABLE | ||
/* -------------------------------------------------- */ | ||
extern const command_t user_commands[]; | ||
extern const unsigned int num_user_commands; | ||
|
||
/* -------------------------------------------------- */ | ||
// FUNCTION PROTOTYPES | ||
/* -------------------------------------------------- */ | ||
int handle_size(int argc, char *argv[]); | ||
|
||
int handle_format(int argc, char *argv[]); | ||
|
||
int handle_mount(int argc, char *argv[]); | ||
|
||
int handle_ls(int argc, char *argv[]); | ||
|
||
int handle_mkdir(int argc, char *argv[]); | ||
|
||
int handle_createfile(int argc, char *argv[]); | ||
|
||
int handle_cd(int argc, char *argv[]); | ||
|
||
int handle_add_data(int argc, char *argv[]); | ||
|
||
int handle_del(int argc, char *argv[]); | ||
|
||
int handle_fatfs(int argc, char *argv[]); | ||
|
||
int handle_unmount(int argc, char *argv[]); | ||
|
||
#endif // EXAMPLES_MAX32650_SDHC_FAT_INCLUDE_USER_CLI_H_ |
Oops, something went wrong.