Example #1
0
static inline bool mcc_nsc(struct rfcomm_frame *rfcomm_frame, uint8_t indent)
{
	struct l2cap_frame *frame = &rfcomm_frame->l2cap_frame;
	struct rfcomm_nsc nsc;

	if (!l2cap_frame_get_u8(frame, &nsc.cmd_type))
		return false;

	print_field("%*ccr %d, mcc_cmd_type %x", indent, ' ',
		GET_CR(nsc.cmd_type), RFCOMM_GET_MCC_TYPE(nsc.cmd_type));

	return true;
}
Example #2
0
static void print_rfcomm_hdr(struct rfcomm_frame *rfcomm_frame, uint8_t indent)
{
	struct rfcomm_lhdr hdr = rfcomm_frame->hdr;

	/* Address field */
	print_field("%*cAddress: 0x%2.2x cr %d dlci 0x%2.2x", indent, ' ',
					hdr.address, GET_CR(hdr.address),
					RFCOMM_GET_DLCI(hdr.address));

	/* Control field */
	print_field("%*cControl: 0x%2.2x poll/final %d", indent, ' ',
					hdr.control, GET_PF(hdr.control));

	/* Length and FCS */
	print_field("%*cLength: %d", indent, ' ', hdr.length);
	print_field("%*cFCS: 0x%2.2x", indent, ' ', hdr.fcs);
}
Example #3
0
File: isr.c Project: mambrus/tinker
void isr_external()
{
	//PUSHALL;
	extern int __tk_IntFlagCntr;
	__uint32_t stack_ptr;
	__uint32_t cr;
	__tk_IntFlagCntr++;
	//__uint32_t *sipend = &SIPEND;
	idx = *(__int8_t *) (&SIVEC);
	//idx = (idx/4)-1;
	idx = (idx / 4);

	GET_GPR(1, stack_ptr);

	n_isr++;
	if (n_isr > 1)
		possible_starvation();

	if (stack_ptr & 0x00000003)
		alignement_issue();
	else
		isr_table[idx] ();

#ifndef DONT_FECKUP_ON_PURPOSE
//feck up un purpose to check that context is fully saved and resored
	SET_SPR(_CTR, 0xFFFF);
	SET_SPR(_XER, 0xFFFF);
	GET_CR(cr);
	SET_CR(0xFFFFFFFF);
#endif
	if (SIPEND & 0x5555)	//If internal interrupt (i.e. lvl_Intrnl_0 to lvl_Intrnl_7)
		SET_SPR(_EIE, 0xFF);	//permit nested interrupts
	n_isr--;
	__tk_IntFlagCntr--;
	//POPALL;
}