1.Modify project directory structure

2.Add support for GPIO and UART peripherals
3.Add pin and serial device driver support
4.Put pictures in local folder
5.Modify README file
This commit is contained in:
whik
2020-07-07 17:17:45 +08:00
parent 02c6c92a19
commit 1731a6cd99
48 changed files with 5076 additions and 16452 deletions
File diff suppressed because it is too large Load Diff
@@ -1,90 +0,0 @@
/*******************************************************************************
* (c) Copyright 2012-2016 Microsemi SoC Products Group. All rights reserved.
*
* SmartFusion2 COMBLK access functions.
*
* SVN $Revision: 8345 $
* SVN $Date: 2016-03-23 11:53:04 +0530 (Wed, 23 Mar 2016) $
*/
#ifndef __MSS_COMBLK_H_
#define __MSS_COMBLK_H_ 1
#include "../../CMSIS/m2sxxx.h"
#include "mss_comblk_page_handler.h"
#ifdef __cplusplus
extern "C" {
#endif
/*------------------------------------------------------------------------------
*
*/
typedef void(*comblk_completion_handler_t)(uint8_t * p_response, uint16_t response_size);
typedef void (*comblk_async_event_handler_t)(uint8_t event_opcode);
/*------------------------------------------------------------------------------
*
*/
void MSS_COMBLK_init
(
comblk_async_event_handler_t async_event_handler,
uint8_t* p_response
);
/*------------------------------------------------------------------------------
*
*/
void MSS_COMBLK_send_cmd_with_ptr
(
uint8_t cmd_opcode,
uint32_t cmd_params_ptr,
uint8_t * p_response,
uint16_t response_size,
comblk_completion_handler_t completion_handler
);
/*------------------------------------------------------------------------------
*
*/
void MSS_COMBLK_send_cmd
(
const uint8_t * p_cmd,
uint16_t cmd_size,
const uint8_t * p_data,
uint32_t data_size,
uint8_t * p_response,
uint16_t response_size,
comblk_completion_handler_t completion_handler
);
/*------------------------------------------------------------------------------
*
*/
void MSS_COMBLK_read
(
const uint8_t * p_data,
uint16_t cmd_size,
uint8_t * p_response,
uint16_t response_size,
comblk_completion_handler_t completion_handler
);
/*------------------------------------------------------------------------------
*
*/
void MSS_COMBLK_send_paged_cmd
(
const uint8_t * p_cmd,
uint16_t cmd_size,
uint8_t * p_response,
uint16_t response_size,
comblk_page_handler_t page_read_handler,
comblk_completion_handler_t completion_handler
);
#ifdef __cplusplus
}
#endif
#endif /* __MSS_COMBLK_H_ */
@@ -1,66 +0,0 @@
/*******************************************************************************
* (c) Copyright 2012-2016 Microsemi SoC Products Group. All rights reserved.
*
* SmartFusion2 MSS COM block driver, page handler callback function prototype.
*
* SVN $Revision: 8345 $
* SVN $Date: 2016-03-23 11:53:04 +0530 (Wed, 23 Mar 2016) $
*/
#ifndef __MSS_COMBLK_PAGE_HANDLER_H_
#define __MSS_COMBLK_PAGE_HANDLER_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*-------------------------------------------------------------------------*//**
The comblk_page_handler_t typedef specifies the function prototype of a COMBLK
page handler callback function. This callback is used by the system services
and COMBLK drivers as part of in-system programming (ISP) to retrieve the next
page of programming information to send to the SmartFusion2 System Controller
via the COMBLK.
The COMBLK page handler must be implemented by the application layer to return
the address of the next page of programming data to be sent to the
SmartFusion2 system controller. It must return the number of bytes contained
in the next page. Returning a value of zero indicates that all programming
data has been passed to the system services/COMBLK drivers.
@code
#define PAGE_LENGTH 512
uint8_t programming_data[PROG_DATA_LENGTH];
uint32_t prog_data_index = 0;
uint32_t page_read_handler
(
uint8_t const ** pp_next_page
)
{
uint32_t returned_page_length;
uint32_t remaining_length;
*pp_next_page = &programming_data[prog_data_index];
remaining_length = PROG_DATA_LENGTH - prog_data_index
if(remaining_length > PAGE_LENGTH)
{
returned_page_length = PAGE_LENGTH;
}
else
{
returned_page_length = remaining_length;
prog_data_index = PROG_DATA_LENGTH;
}
return returned_page_length;
}
@endcode
*/
typedef uint32_t (*comblk_page_handler_t)(uint8_t const ** pp_next_page);
#ifdef __cplusplus
}
#endif
#endif /* __MSS_COMBLK_PAGE_HANDLER_H_ */
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff