mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #1285 from masaohamanaka/master
RZ_A1H - Add RZ_A1H in RPC. Modify communication problem of Ethernet.pull/1144/merge
commit
52618298c3
|
@ -24,17 +24,14 @@ static void rza1_recv_task(void *arg) {
|
||||||
struct eth_hdr *ethhdr;
|
struct eth_hdr *ethhdr;
|
||||||
u16_t recv_size;
|
u16_t recv_size;
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct pbuf *q;
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
sys_arch_sem_wait(&recv_ready_sem, 0);
|
sys_arch_sem_wait(&recv_ready_sem, 0);
|
||||||
recv_size = ethernet_receive();
|
recv_size = ethernet_receive();
|
||||||
if (recv_size != 0) {
|
if (recv_size != 0) {
|
||||||
p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_POOL);
|
p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_RAM);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
for (q = p; q != NULL; q = q->next) {
|
(void)ethernet_read((char *)p->payload, p->len);
|
||||||
(void)ethernet_read((char *)q->payload, q->len);
|
|
||||||
}
|
|
||||||
ethhdr = p->payload;
|
ethhdr = p->payload;
|
||||||
switch (htons(ethhdr->type)) {
|
switch (htons(ethhdr->type)) {
|
||||||
case ETHTYPE_IP:
|
case ETHTYPE_IP:
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#include "mbed.h"
|
||||||
#include "Arguments.h"
|
#include "Arguments.h"
|
||||||
#include "pinmap.h"
|
#include "pinmap.h"
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ PinName parse_pins(const char *str) {
|
||||||
, NC, NC, NC, NC, NC, NC, NC, NC, p41, p42, p43, p44, p45, p46};
|
, NC, NC, NC, NC, NC, NC, NC, NC, p41, p42, p43, p44, p45, p46};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC812) || defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM) || defined(TARGET_LPC1114)
|
#if defined(TARGET_LPC1768) || defined(TARGET_LPC11U24) || defined(TARGET_LPC2368) || defined(TARGET_LPC812) || defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM) || defined(TARGET_LPC1114) || defined(TARGET_RZ_A1H)
|
||||||
if (str[0] == 'P') { // Pn_n
|
if (str[0] == 'P') { // Pn_n
|
||||||
uint32_t port = str[1] - '0';
|
uint32_t port = str[1] - '0';
|
||||||
uint32_t pin = str[3] - '0'; // Pn_n
|
uint32_t pin = str[3] - '0'; // Pn_n
|
||||||
|
|
Loading…
Reference in New Issue