updated handshake flow for stack
This commit is contained in:
parent
e0fbf114b5
commit
f5ab763719
@ -43,9 +43,13 @@ typedef struct tUcpHandshake{
|
||||
} UcpHandshake_t;
|
||||
|
||||
UcpHandshake_t* get_handshake_info(void);
|
||||
void handshake_with_host(void);
|
||||
//void handshake_with_host(void);
|
||||
void handshake_master_with_slave(void);
|
||||
void handshake_slave_with_master(void);
|
||||
int32_t get_host_core_id(void);
|
||||
void handshake_request_from_host(int32_t core_id);
|
||||
void handshake_response_to_host(int32_t core_id);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -26,7 +26,7 @@ UcpHandshake_t* get_handshake_info(void)
|
||||
return pPetSmLocalMgt->pHandshake;
|
||||
}
|
||||
|
||||
static inline int32_t get_host_core_id(void)
|
||||
int32_t get_host_core_id(void)
|
||||
{
|
||||
int32_t core_id;
|
||||
|
||||
@ -71,6 +71,7 @@ void handshake_response_to_host(int32_t core_id)
|
||||
}
|
||||
|
||||
//master is the core which controlled the handshake flow
|
||||
#if 0
|
||||
void handshake_with_host(void)
|
||||
{
|
||||
int32_t core_id = get_host_core_id();
|
||||
@ -79,6 +80,7 @@ void handshake_with_host(void)
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//master is the core which controlled the handshake flow
|
||||
void handshake_master_with_slave(void)
|
||||
@ -142,3 +144,4 @@ void handshake_slave_with_master(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -46,7 +46,9 @@ void pet_rfm_spu1_msg_transfer_init(void)
|
||||
{
|
||||
msg_transfer_mem_alloc();
|
||||
|
||||
handshake_with_host();
|
||||
int32_t core_id = get_host_core_id();
|
||||
handshake_request_from_host(core_id);
|
||||
//handshake_with_host();
|
||||
|
||||
msg_transfer_queue_init();//initialized local queuecfg from common queuecfg
|
||||
|
||||
@ -54,6 +56,8 @@ void pet_rfm_spu1_msg_transfer_init(void)
|
||||
|
||||
handshake_master_with_slave();
|
||||
|
||||
handshake_response_to_host(core_id);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -106,7 +110,7 @@ void msg_transfer_enqueue(void)
|
||||
uint16_t idx = ch->in & ch->ringMask;
|
||||
do_write_short(&pIdxBase[idx],buf_id);
|
||||
do_write(&chCommon->in, (ch->in+1));
|
||||
|
||||
|
||||
__ucps2_synch(0);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user