-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(SDHC): Fix SDHC Driver Clock Divider for MAX78002 (#800)
Co-authored-by: Sihyung Woo <[email protected]>
- Loading branch information
1 parent
ade28ae
commit 934bdb3
Showing
21 changed files
with
841 additions
and
570 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
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,70 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (C) 2023 Analog Devices, Inc. All Rights Reserved. This software | ||
* is proprietary to Analog Devices, Inc. and its licensors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
******************************************************************************/ | ||
|
||
#ifndef EXAMPLES_MAX78002_SDHC_FAT_INCLUDE_APP_SDHC_H_ | ||
#define EXAMPLES_MAX78002_SDHC_FAT_INCLUDE_APP_SDHC_H_ | ||
|
||
/***** 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 deleteFile(char *file_name); | ||
|
||
int example(); | ||
|
||
void waitCardInserted(); | ||
|
||
#endif // EXAMPLES_MAX78002_SDHC_FAT_INCLUDE_APP_SDHC_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,54 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (C) 2023 Analog Devices, Inc. All Rights Reserved. This software | ||
* is proprietary to Analog Devices, Inc. and its licensors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
******************************************************************************/ | ||
|
||
#ifndef EXAMPLES_MAX78002_SDHC_FAT_INCLUDE_USER_CLI_H_ | ||
#define EXAMPLES_MAX78002_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_MAX78002_SDHC_FAT_INCLUDE_USER_CLI_H_ |
Oops, something went wrong.