ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Понедельник
6 июля
1594645 Топик полностью
Nikolay_Po (Сегодня, 15:29, просмотров: 28) ответил klen на тут одно из двух на ум приходит - либо ты умеешь пишешь таколй охуэнный код что оптимазеру жало некуда воткнут, либо .... настолько хуевый что он моск себе ломает и плачет :) будем считать что имеем первое :)
Типа такого: 
void vBusHWportRxDestSet(/* Provide a memory to put received serial bus frame */
								uint8_t uBusPortIdx, /* Serial bus port index which frame will be stored at given place */
								uint8_t *puRxFrame, /* Memory address where to put a frame during a reception */
								uint8_t uFrameSizeLimit) /* Size of memory to fit received frame. Longer frame will be truncated */
{
	/* Prepare pointers for shorter critical section */
	uint8_t **ppFrame = &BusPortFast[uBusPortIdx].puRxFrame;
	uint8_t *pSize = &BusPortFast[uBusPortIdx].RxFrameSize;
	__disable_irq(); /* Enter critical section */
	*ppFrame = puRxFrame;
	*pSize = uFrameSizeLimit;
	__enable_irq(); /* Exit critical section */
}