-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Examples): Add CLI Library to MSDK #679
Merged
Jake-Carter
merged 44 commits into
analogdevicesinc:main
from
Suraj-Ajjampur:fix/msdk-1197
Sep 21, 2023
Merged
Changes from 31 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
23354ca
README.md change
b0d72fc
cli changes
61de614
Bugs removed
86e191b
Working CLI
e1a9ff7
Interrupt based uart
d957156
Enable SD Card detection
da80146
Enter bug Fix
41ba63d
Compatility with SDHC functions tested
4483da7
tested with new functionality
2a9d668
User prompt
fb2760b
User prompt
8dcfc57
Doxygen comments and Userguide update
0f2d99e
Resolve conflicts, fix Typos
32dc919
Merge branch 'main' into fix/msdk-1197
Suraj-Ajjampur 3581e0f
clang-format bot reformatting.
Suraj-Ajjampur 180bac7
CLI library ReadMe and CLI_UART added
2c7c180
Merge branch 'fix/msdk-1197' of https://github.com/Suraj-Ajjampur/msd…
f39afce
Readme cli and cli_uart
d2d8faa
clang-format bot reformatting.
Suraj-Ajjampur ad03f20
Refactor CLI driver (pt. 1)
Jacob-Scheiffler b74eeef
Merge branch 'main' into fix/msdk-1197
Jacob-Scheiffler 47499dd
Refactor CLI library (pt. 2)
Jacob-Scheiffler 2e8b0b5
Refactor CLI library (pt 3)
Jacob-Scheiffler a7ac928
Update SDHC_FTHR example to use refactored CLI library
Jacob-Scheiffler 399ef10
Remove the user-cli header file include in cli.c
Jacob-Scheiffler cd86680
Update CLI library README
Jacob-Scheiffler e0b27f6
Revert SDHC_FTHR example settings.json file to standard.
Jacob-Scheiffler ebf80d3
Refactor CLI library (pt 4)
Jacob-Scheiffler 0d54953
Update SDHC_FTHR example to use refactored CLI library
Jacob-Scheiffler c0bdda6
Make requested changes to CLI library
Jacob-Scheiffler 24399f3
Update CLI README according to most recent changes in the CLI source.
Jacob-Scheiffler 6c4afa5
Resolve linter errors
Jacob-Scheiffler 4c54fb2
Update CLI library README
Jacob-Scheiffler 2ef153d
Resolve clang-format errors
Jacob-Scheiffler b03762d
Resolve linter errors (pt. 2)
Jacob-Scheiffler cc71c8f
Adding ability to select whether CLI handler is defined in applicatio…
Jacob-Scheiffler 86a1464
Merge branch 'main' into fix/msdk-1197
Jacob-Scheiffler d90901f
Resolve clang-format errors
Jacob-Scheiffler e2e16e7
Merge branch 'fix/msdk-1197' of github.com:Suraj-Ajjampur/msdk into f…
Jacob-Scheiffler 836d635
Update SDHC_FTHR examples to be compatible with latest CLI changes
Jacob-Scheiffler 8d621d8
Update documentation, add LIB_CLI build toggle, tweak makefiles
Jake-Carter 375ad19
Update project files
Jake-Carter 37c85d0
Add CLI readme to UG, format tweaking
Jake-Carter 1d60354
Re-add MSDKGen missed ipath/vpaths
Jake-Carter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,83 @@ | ||
/****************************************************************************** | ||
* 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 SDHC_HEADER | ||
#define SDHC_HEADER | ||
|
||
/***** Includes *****/ | ||
#include <stdio.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
#include "board.h" | ||
#include "mxc_delay.h" | ||
#include "mxc_device.h" | ||
#include "gpio.h" | ||
#include "uart.h" | ||
#include "ff.h" | ||
|
||
/***** Definitions *****/ | ||
|
||
#define STRINGIFY(x) #x | ||
#define TOSTRING(x) STRINGIFY(x) | ||
#define MAXLEN 256 | ||
|
||
/***** FUNCTION PROTOTYPES *****/ | ||
|
||
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 delete (char *file_name); | ||
|
||
int example(); | ||
|
||
void waitCardInserted(); | ||
|
||
#endif //SDHC_HEADER |
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,69 @@ | ||
/****************************************************************************** | ||
* 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 USER_CLI_H | ||
#define USER_CLI_H | ||
|
||
/* -------------------------------------------------- */ | ||
// GLOBAL VARIABLE | ||
/* -------------------------------------------------- */ | ||
extern const command_t user_commands[]; | ||
extern const unsigned int num_user_commands; | ||
|
||
/* -------------------------------------------------- */ | ||
// FUNCTION PROTOTYPES | ||
/* -------------------------------------------------- */ | ||
void CLI_IRQHandler(void); | ||
|
||
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 /* USER_CLI_H */ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default board is the FTHR_RevA for the SDHC example