Skip to content
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

[RZ/A1H] mbed-RZ first release #594

Merged
merged 36 commits into from
Nov 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b78ac75
[RZ/A1H] mbed-RZ first release
tkuro-rel Oct 23, 2014
c7c1613
Revert "[RZ/A1H] mbed-RZ first release"
tkuro-rel Oct 24, 2014
b161a14
Merge remote-tracking branch 'upstream/master'
tkuro-rel Oct 24, 2014
b1cb82c
[RZ/A1H] commit for build system changes
tkuro-rel Oct 24, 2014
193bdaa
[RZ/A1H] commit for CMSIS changes
tkuro-rel Oct 24, 2014
9ddce12
[RZ/A1H] commit for HAL changes
tkuro-rel Oct 24, 2014
b024a3d
[RZ/A1H] commit for RTOS changes
tkuro-rel Oct 24, 2014
55ddb7f
[RZ/A1H] fixs scatter file
tkuro-rel Oct 24, 2014
cff29fd
[RZ/A1H] first release - change InterruptManager.cpp for CA9
tkuro-rel Oct 24, 2014
2804d85
[RZ/A1H] adds A9 related MACROS
tkuro-rel Oct 24, 2014
c713db8
Supports the CDC of USB function
Oct 24, 2014
8087cf1
Revert "Supports the CDC of USB function"
Oct 24, 2014
b5cd75c
[RZ/A1H] updates iodefine.h
Oct 24, 2014
462a657
[RZ/A1H] Supports the CDC of USB Function
Oct 24, 2014
a52058e
[RZ/A1H] Revert a macro line
Oct 29, 2014
b8809b3
Merge remote-tracking branch 'upstream/master'
tkuro-rel Oct 29, 2014
6aaae4a
Deleted the debug print and the illegal memory access.
Oct 29, 2014
697dfdd
Merge remote-tracking branch 'origin/master'
Oct 29, 2014
3f32994
Revert "Deleted the debug print and the illegal memory access."
Oct 29, 2014
e8b0bd2
[RZ/A1H] Deletes debugging prints. Expands the stacks and heap. De…
Oct 29, 2014
807f031
[RZ/A1H] disables GCC_ARM in targets.py
tkuro-rel Oct 29, 2014
9a8a75e
Add Ethernet functionality
ms-hama Oct 31, 2014
d517c28
[RZ/A1H] * Some fields for RZ/A1H changed as "private". * Some func…
Nov 5, 2014
3197246
[RZ/A1H] Deletes the tab codes
Nov 5, 2014
2fab4af
[RZ/A1H] changes copy scheme for iodefines/iobitmasks
tkuro-rel Nov 5, 2014
26e1fc8
Merge branch 'master' of https://github.com/tkuro-rel/mbed
tkuro-rel Nov 5, 2014
a95f453
Revert "[RZ/A1H] changes copy scheme for iodefines/iobitmasks"
tkuro-rel Nov 5, 2014
56c838a
[RZ/A1H] changes copy scheme for iodefines/iobitmasks
tkuro-rel Nov 5, 2014
19ca580
Merge remote-tracking branch 'origin'
tkuro-rel Nov 5, 2014
dcca0bf
[RZ/A1H] test message
tkuro-rel Oct 24, 2014
abf47c0
Revert "[RZ/A1H] test message"
tkuro-rel Nov 5, 2014
3c4067a
Merge commit '2fab4af9b1a3d149ba4afc535744d4442a281cf8'
Nov 6, 2014
f89144d
Merge remote-tracking branch 'origin/master'
Nov 6, 2014
b5103bd
[RZ/A1H] (a measure devised to deal with a review.) * Some variables …
Nov 6, 2014
bd79e23
Fixed file header
ms-hama Nov 6, 2014
33a843c
Merge remote-tracking branch 'upstream/master'
tkuro-rel Nov 6, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Nordic:
* [nRF51822-mKIT](https://developer.mbed.org/platforms/Nordic-nRF51822/) (Cortex-M0)
* [Arch BLE](https://developer.mbed.org/platforms/Seeed-Arch-BLE/) (Cortex-M0)

Renesas:
* [RZ-A1H](http://developer.mbed.org/platforms/Renesas-GR-PEACH/) (Cortex-A9)


Supported Toolchains and IDEs
-----------------------------
* GCC ARM: [GNU Tools for ARM Embedded Processors](https://launchpad.net/gcc-arm-embedded/4.7/4.7-2012-q4-major)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name : usb0_function.h
* $Rev: 1116 $
* $Date:: 2014-07-09 16:29:19 +0900#$
* Description : RZ/A1H R7S72100 USB Sample Program
*******************************************************************************/
#ifndef USB0_FUNCTION_H
#define USB0_FUNCTION_H


/*******************************************************************************
Includes <System Includes> , "Project Includes"
*******************************************************************************/
#include "devdrv_usb_function_api.h"
#include "usb_function.h"


#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
Typedef definitions
*******************************************************************************/


/*******************************************************************************
Macro definitions
*******************************************************************************/


/*******************************************************************************
Imported global variables and functions (from other files)
*******************************************************************************/
extern const uint16_t g_usb0_function_bit_set[];
extern uint32_t g_usb0_function_data_count[USB_FUNCTION_MAX_PIPE_NO + 1];
extern uint8_t *g_usb0_function_data_pointer[USB_FUNCTION_MAX_PIPE_NO + 1];

extern uint16_t g_usb0_function_PipeIgnore[];
extern uint16_t g_usb0_function_PipeTbl[];
extern uint16_t g_usb0_function_pipe_status[];
extern uint32_t g_usb0_function_PipeDataSize[];

extern USB_FUNCTION_DMA_t g_usb0_function_DmaInfo[];
extern uint16_t g_usb0_function_DmaPipe[];
extern uint16_t g_usb0_function_DmaBval[];
extern uint16_t g_usb0_function_DmaStatus[];

extern uint16_t g_usb0_function_CtrZeroLengthFlag;

extern uint16_t g_usb0_function_ConfigNum;
extern uint16_t g_usb0_function_Alternate[USB_FUNCTION_ALT_NO];
extern uint16_t g_usb0_function_RemoteWakeupFlag;
extern uint16_t g_usb0_function_TestModeFlag;
extern uint16_t g_usb0_function_TestModeSelectors;

extern uint16_t g_usb0_function_ReqType;
extern uint16_t g_usb0_function_ReqTypeType;
extern uint16_t g_usb0_function_ReqTypeRecip;
extern uint16_t g_usb0_function_ReqRequest;
extern uint16_t g_usb0_function_ReqValue;
extern uint16_t g_usb0_function_ReqIndex;
extern uint16_t g_usb0_function_ReqLength;

extern uint16_t g_usb0_function_EPTableIndex[USB_FUNCTION_MAX_EP_NO + 1];

extern uint16_t g_usb0_function_pipecfg[USB_FUNCTION_MAX_PIPE_NO + 1];
extern uint16_t g_usb0_function_pipebuf[USB_FUNCTION_MAX_PIPE_NO + 1];
extern uint16_t g_usb0_function_pipemaxp[USB_FUNCTION_MAX_PIPE_NO + 1];
extern uint16_t g_usb0_function_pipeperi[USB_FUNCTION_MAX_PIPE_NO + 1];


/*******************************************************************************
Exported global variables and functions (to be accessed by other files)
*******************************************************************************/
/* ==== common ==== */
void usb0_function_dma_stop_d0(uint16_t pipe, uint32_t remain);
void usb0_function_dma_stop_d1(uint16_t pipe, uint32_t remain);
uint16_t usb0_function_is_hispeed(void);
uint16_t usb0_function_is_hispeed_enable(void);
uint16_t usb0_function_start_send_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
uint16_t usb0_function_write_buffer(uint16_t pipe);
uint16_t usb0_function_write_buffer_c(uint16_t pipe);
uint16_t usb0_function_write_buffer_d0(uint16_t pipe);
uint16_t usb0_function_write_buffer_d1(uint16_t pipe);
void usb0_function_start_receive_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
uint16_t usb0_function_read_buffer(uint16_t pipe);
uint16_t usb0_function_read_buffer_c(uint16_t pipe);
uint16_t usb0_function_read_buffer_d0(uint16_t pipe);
uint16_t usb0_function_read_buffer_d1(uint16_t pipe);
uint16_t usb0_function_change_fifo_port(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
void usb0_function_set_curpipe(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
void usb0_function_set_curpipe2(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw, uint16_t dfacc);
uint16_t usb0_function_get_mbw(uint32_t trncount, uint32_t dtptr);
uint16_t usb0_function_read_dma(uint16_t pipe);
void usb0_function_brdy_int(uint16_t status, uint16_t int_enb);
void usb0_function_nrdy_int(uint16_t status, uint16_t int_enb);
void usb0_function_bemp_int(uint16_t status, uint16_t int_enb);
void usb0_function_setting_interrupt(uint8_t level);
void usb0_function_reset_module(uint16_t clockmode);
uint16_t usb0_function_get_buf_size(uint16_t pipe);
uint16_t usb0_function_get_mxps(uint16_t pipe);
void usb0_function_clear_brdy_sts(uint16_t pipe);
void usb0_function_clear_bemp_sts(uint16_t pipe);
void usb0_function_clear_nrdy_sts(uint16_t pipe);
void usb0_function_set_pid_buf(uint16_t pipe);
void usb0_function_set_pid_nak(uint16_t pipe);
void usb0_function_set_pid_stall(uint16_t pipe);
void usb0_function_clear_pid_stall(uint16_t pipe);
uint16_t usb0_function_get_pid(uint16_t pipe);
void usb0_function_set_sqclr(uint16_t pipe);
void usb0_function_set_sqset(uint16_t pipe);
void usb0_function_set_csclr(uint16_t pipe);
void usb0_function_aclrm(uint16_t pipe);
void usb0_function_set_aclrm(uint16_t pipe);
void usb0_function_clr_aclrm(uint16_t pipe);
uint16_t usb0_function_get_sqmon(uint16_t pipe);
uint16_t usb0_function_get_inbuf(uint16_t pipe);

/* ==== function ==== */
void usb0_function_init_status(void);
void usb0_function_InitModule(uint16_t mode);
uint16_t usb0_function_CheckVBUStaus(void);
void usb0_function_USB_FUNCTION_Attach(void);
void usb0_function_USB_FUNCTION_Detach(void);
void usb0_function_USB_FUNCTION_BusReset(void);
void usb0_function_USB_FUNCTION_Resume(void);
void usb0_function_USB_FUNCTION_Suspend(void);
void usb0_function_USB_FUNCTION_TestMode(void);
void usb0_function_ResetDCP(void);
void usb0_function_ResetEP(uint16_t num);
uint16_t usb0_function_EpToPipe(uint16_t ep);
void usb0_function_InitEPTable(uint16_t Con_Num, uint16_t Int_Num, uint16_t Alt_Num);
uint16_t usb0_function_GetConfigNum(void);
uint16_t usb0_function_GetAltNum(uint16_t Con_Num, uint16_t Int_Num);
uint16_t usb0_function_CheckRemoteWakeup(void);
void usb0_function_clear_alt(void);
void usb0_function_clear_pipe_tbl(void);
void usb0_function_clear_ep_table_index(void);
uint16_t usb0_function_GetInterfaceNum(uint16_t num);

#ifdef __cplusplus
}
#endif


#endif /* USB0_FUNCTION_H */

/* End of File */
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
*******************************************************************************/
/*******************************************************************************
* File Name : usb0_function_api.h
* $Rev: 1116 $
* $Date:: 2014-07-09 16:29:19 +0900#$
* Description : RZ/A1H R7S72100 USB Sample Program
*******************************************************************************/
#ifndef USB0_FUNCTION_API_H
#define USB0_FUNCTION_API_H

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
Includes <System Includes> , "Project Includes"
*******************************************************************************/


/*******************************************************************************
Typedef definitions
*******************************************************************************/


/*******************************************************************************
Macro definitions
*******************************************************************************/


/*******************************************************************************
Variable Externs
*******************************************************************************/


/*******************************************************************************
Exported global variables and functions (to be accessed by other files)
*******************************************************************************/
void usb0_api_function_init(uint8_t int_level, uint16_t mode, uint16_t clockmode);
uint16_t usb0_api_function_IsConfigured(void);
uint16_t usb0_function_GetDeviceState(void);
uint16_t usb0_api_function_CtrlReadStart(uint32_t size, uint8_t *data);
void usb0_api_function_CtrlWriteStart(uint32_t size, uint8_t *data);
uint16_t usb0_api_function_start_send_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
uint16_t usb0_api_function_check_pipe_status(uint16_t pipe, uint32_t *size);
void usb0_api_function_clear_pipe_status(uint16_t pipe);
void usb0_api_function_start_receive_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
void usb0_api_function_set_pid_buf(uint16_t pipe);
void usb0_api_function_set_pid_nak(uint16_t pipe);
void usb0_api_function_set_pid_stall(uint16_t pipe);
void usb0_api_function_clear_pid_stall(uint16_t pipe);
uint16_t usb0_api_function_get_pid(uint16_t pipe);
int32_t usb0_api_function_check_stall(uint16_t pipe);
void usb0_api_function_set_sqclr(uint16_t pipe);
void usb0_api_function_set_sqset(uint16_t pipe);
void usb0_api_function_set_csclr(uint16_t pipe);
void usb0_api_function_set_curpipe(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
void usb0_api_function_clear_brdy_sts(uint16_t pipe);
void usb0_api_function_clear_bemp_sts(uint16_t pipe);
void usb0_api_function_clear_nrdy_sts(uint16_t pipe);

void usb0_function_ClearFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_SetFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_SetAddress(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_SetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_SetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_SetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_SynchFrame(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_GetStatus(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_GetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_GetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_GetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_Resrv_0(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_Resrv_123(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_Resrv_4(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
void usb0_function_Resrv_5(uint16_t type, uint16_t value, uint16_t index, uint16_t length);

#ifdef __cplusplus
}
#endif

#endif /* USB0_FUNCTION_API_H */

/* End of File */
Loading