-
Notifications
You must be signed in to change notification settings - Fork 58
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 #282 from jphickey/fix-10-modularize-ram-port-access
Fix #10, modularize the ram, port, and eeprom access
- Loading branch information
Showing
17 changed files
with
208 additions
and
50 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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
|
||
soft_timebase | ||
eeprom_direct | ||
ram_direct | ||
port_direct |
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,3 @@ | ||
|
||
# Create the module | ||
add_psp_module(eeprom_notimpl cfe_psp_eeprom_notimpl.c) |
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 |
---|---|---|
|
@@ -19,23 +19,23 @@ | |
*/ | ||
|
||
/** | ||
* \file cfe_psp_eeprom_stub.c | ||
* \file cfe_psp_eeprom_notimpl.c | ||
* | ||
* Created on: Jul 17, 2015 | ||
* Author: [email protected] | ||
* A PSP module to satisfy the "EEPROM" API on systems which | ||
* do not have an EEPROM or otherwise cannot access it. | ||
* | ||
* This is a stub implementation of the PSP EEPROM API calls that return CFE_PSP_ERROR_NOT_IMPLEMENTED | ||
* All functions return CFE_PSP_ERR_NOT_IMPLEMENTED | ||
*/ | ||
|
||
#include "cfe_psp.h" | ||
#include "cfe_psp_module.h" | ||
|
||
CFE_PSP_MODULE_DECLARE_SIMPLE(eeprom_stub); | ||
CFE_PSP_MODULE_DECLARE_SIMPLE(eeprom_notimpl); | ||
|
||
void eeprom_stub_Init(uint32 PspModuleId) | ||
void eeprom_notimpl_Init(uint32 PspModuleId) | ||
{ | ||
/* Inform the user that this module is in use */ | ||
printf("CFE_PSP: Using STUB EEPROM implementation\n"); | ||
printf("CFE_PSP: EEPROM access not implemented\n"); | ||
} | ||
|
||
int32 CFE_PSP_EepromWrite32(cpuaddr MemoryAddress, uint32 uint32Value) | ||
|
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
|
||
# Create the module | ||
add_psp_module(port_direct cfe_psp_port_direct.c) |
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,3 @@ | ||
|
||
# Create the module | ||
add_psp_module(port_notimpl cfe_psp_port_notimpl.c) |
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 @@ | ||
/* | ||
** GSC-18128-1, "Core Flight Executive Version 6.7" | ||
** | ||
** Copyright (c) 2006-2019 United States Government as represented by | ||
** the Administrator of the National Aeronautics and Space Administration. | ||
** All Rights Reserved. | ||
** | ||
** 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. | ||
*/ | ||
|
||
/** | ||
* \file cfe_psp_port_notimpl.c | ||
* | ||
* A PSP module to satisfy the "Port" API on systems which | ||
* do not have or otherwise cannot access I/O ports. | ||
* | ||
* All functions return CFE_PSP_ERR_NOT_IMPLEMENTED | ||
*/ | ||
|
||
#include "cfe_psp.h" | ||
#include "cfe_psp_module.h" | ||
|
||
CFE_PSP_MODULE_DECLARE_SIMPLE(port_notimpl); | ||
|
||
void port_notimpl_Init(uint32 PspModuleId) | ||
{ | ||
/* Inform the user that this module is in use */ | ||
printf("CFE_PSP: I/O Port access not implemented\n"); | ||
} | ||
|
||
int32 CFE_PSP_PortRead8(cpuaddr PortAddress, uint8 *ByteValue) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_PortWrite8(cpuaddr PortAddress, uint8 ByteValue) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_PortRead16(cpuaddr PortAddress, uint16 *uint16Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_PortWrite16(cpuaddr PortAddress, uint16 uint16Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_PortRead32(cpuaddr PortAddress, uint32 *uint32Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_PortWrite32(cpuaddr PortAddress, uint32 uint32Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} |
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,3 @@ | ||
|
||
# Create the module | ||
add_psp_module(ram_direct cfe_psp_ram_direct.c) |
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,3 @@ | ||
|
||
# Create the module | ||
add_psp_module(ram_notimpl cfe_psp_ram_notimpl.c) |
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 @@ | ||
/* | ||
** GSC-18128-1, "Core Flight Executive Version 6.7" | ||
** | ||
** Copyright (c) 2006-2019 United States Government as represented by | ||
** the Administrator of the National Aeronautics and Space Administration. | ||
** All Rights Reserved. | ||
** | ||
** 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. | ||
*/ | ||
|
||
/** | ||
* \file cfe_psp_ram_notimpl.c | ||
* | ||
* A PSP module to satisfy the "RAM" API on systems which | ||
* cannot access physical memory directly. | ||
* | ||
* All functions return CFE_PSP_ERR_NOT_IMPLEMENTED | ||
*/ | ||
|
||
#include "cfe_psp.h" | ||
#include "cfe_psp_module.h" | ||
|
||
CFE_PSP_MODULE_DECLARE_SIMPLE(ram_notimpl); | ||
|
||
void ram_notimpl_Init(uint32 PspModuleId) | ||
{ | ||
/* Inform the user that this module is in use */ | ||
printf("CFE_PSP: Physical RAM access not implemented\n"); | ||
} | ||
|
||
int32 CFE_PSP_MemRead8(cpuaddr MemoryAddress, uint8 *ByteValue) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_MemWrite8(cpuaddr MemoryAddress, uint8 ByteValue) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_MemRead16(cpuaddr MemoryAddress, uint16 *uint16Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_MemWrite16(cpuaddr MemoryAddress, uint16 uint16Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_MemRead32(cpuaddr MemoryAddress, uint32 *uint32Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} | ||
|
||
int32 CFE_PSP_MemWrite32(cpuaddr MemoryAddress, uint32 uint32Value) | ||
{ | ||
return (CFE_PSP_ERROR_NOT_IMPLEMENTED); | ||
} |
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
|
||
soft_timebase | ||
eeprom_mmap_file | ||
ram_notimpl | ||
port_notimpl |
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,5 +1,7 @@ | ||
# This is a list of modules that is included as a fixed/base set | ||
# when this PSP is selected. They must exist under fsw/modules | ||
|
||
eeprom_stub | ||
eeprom_notimpl | ||
ram_direct | ||
port_notimpl | ||
soft_timebase |
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