Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
swym
firmware
Commits
dfe6147a
Commit
dfe6147a
authored
5 years ago
by
swym
Committed by
rahix
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
rename macros
parent
54694834
No related branches found
No related tags found
No related merge requests found
Pipeline
#2401
passed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/mx25lba/mx25lba.c
+10
-10
10 additions, 10 deletions
lib/mx25lba/mx25lba.c
with
10 additions
and
10 deletions
lib/mx25lba/mx25lba.c
+
10
−
10
View file @
dfe6147a
...
@@ -39,10 +39,10 @@
...
@@ -39,10 +39,10 @@
#include
<stdio.h>
#include
<stdio.h>
#include
"mx25.h"
#include
"mx25.h"
#ifdef
SPAMMY_MX25
#ifdef
MX25_PRINT_FUNCTION_NAMES
#define
SPAM
_FUNCTION_NAME printf("%s\n", __func__);
#define
PRINT
_FUNCTION_NAME printf("%s\n", __func__);
#else
#else
#define
SPAM
_FUNCTION_NAME
#define
PRINT
_FUNCTION_NAME
#endif
#endif
/***** Definitions *****/
/***** Definitions *****/
...
@@ -123,7 +123,7 @@ static uint32_t getSector(uint32_t num)
...
@@ -123,7 +123,7 @@ static uint32_t getSector(uint32_t num)
/******************************************************************************/
/******************************************************************************/
int
mx25_init
()
int
mx25_init
()
{
{
SPAM
_FUNCTION_NAME
PRINT
_FUNCTION_NAME
if
(
!
initialized
)
{
if
(
!
initialized
)
{
MX25_Init
();
MX25_Init
();
...
@@ -137,7 +137,7 @@ int mx25_init()
...
@@ -137,7 +137,7 @@ int mx25_init()
/******************************************************************************/
/******************************************************************************/
uint32_t
mx25_size
(
void
)
uint32_t
mx25_size
(
void
)
{
{
//
SPAM
_FUNCTION_NAME
//
PRINT
_FUNCTION_NAME
/* Get number of 512 byte chunks the MX25 contains. */
/* Get number of 512 byte chunks the MX25 contains. */
return
(
MX25_SECTOR_SIZE
>>
LBA_SIZE_SHIFT
)
*
MX25_NUM_SECTORS
;
return
(
MX25_SECTOR_SIZE
>>
LBA_SIZE_SHIFT
)
*
MX25_NUM_SECTORS
;
}
}
...
@@ -145,7 +145,7 @@ uint32_t mx25_size(void)
...
@@ -145,7 +145,7 @@ uint32_t mx25_size(void)
/******************************************************************************/
/******************************************************************************/
int
mx25_read
(
uint32_t
lba
,
uint8_t
*
buffer
)
int
mx25_read
(
uint32_t
lba
,
uint8_t
*
buffer
)
{
{
//
SPAM
_FUNCTION_NAME
//
PRINT
_FUNCTION_NAME
uint32_t
addr
;
uint32_t
addr
;
/* Convert to MX25 sector number. */
/* Convert to MX25 sector number. */
...
@@ -167,7 +167,7 @@ int mx25_read(uint32_t lba, uint8_t* buffer)
...
@@ -167,7 +167,7 @@ int mx25_read(uint32_t lba, uint8_t* buffer)
/******************************************************************************/
/******************************************************************************/
int
mx25_write
(
uint32_t
lba
,
uint8_t
*
buffer
)
int
mx25_write
(
uint32_t
lba
,
uint8_t
*
buffer
)
{
{
//
SPAM
_FUNCTION_NAME
//
PRINT
_FUNCTION_NAME
uint32_t
addr
;
uint32_t
addr
;
/* Convert to MX25 sector number. */
/* Convert to MX25 sector number. */
...
@@ -190,7 +190,7 @@ int mx25_write(uint32_t lba, uint8_t* buffer)
...
@@ -190,7 +190,7 @@ int mx25_write(uint32_t lba, uint8_t* buffer)
/******************************************************************************/
/******************************************************************************/
int
mx25_start
()
int
mx25_start
()
{
{
SPAM
_FUNCTION_NAME
PRINT
_FUNCTION_NAME
/* Turn on the MX25 if it is not already. */
/* Turn on the MX25 if it is not already. */
if
(
!
initialized
)
{
if
(
!
initialized
)
{
mx25_init
();
mx25_init
();
...
@@ -208,7 +208,7 @@ int mx25_start()
...
@@ -208,7 +208,7 @@ int mx25_start()
/******************************************************************************/
/******************************************************************************/
int
mx25_stop
()
int
mx25_stop
()
{
{
SPAM
_FUNCTION_NAME
PRINT
_FUNCTION_NAME
/* TODO - could shut down XIPF interface here. */
/* TODO - could shut down XIPF interface here. */
/* Flush the currently cached sector if necessary. */
/* Flush the currently cached sector if necessary. */
...
@@ -222,7 +222,7 @@ int mx25_stop()
...
@@ -222,7 +222,7 @@ int mx25_stop()
/******************************************************************************/
/******************************************************************************/
int
mx25_sync
()
int
mx25_sync
()
{
{
SPAM
_FUNCTION_NAME
PRINT
_FUNCTION_NAME
/* Flush the currently cached sector if necessary. */
/* Flush the currently cached sector if necessary. */
if
(
getSector
(
INVALID_SECTOR
))
{
if
(
getSector
(
INVALID_SECTOR
))
{
return
1
;
return
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment