コード例 #1
0
ファイル: main.c プロジェクト: rwooster/LCDscreen
int main()
{
	MSS_UART_init
	(
		&g_mss_uart1,
	    MSS_UART_115200_BAUD,
	    MSS_UART_DATA_8_BITS | MSS_UART_NO_PARITY | MSS_UART_ONE_STOP_BIT
	);

	clear_screen();

	float x = -90;
	while (1)
	{
		print_degrees(x);

		//Busy
		int i;
		for (i = 0; i < 1000000; i++)
		{
		}

		x += 10;

		if (x > 90)
			x = -90;
	}



	return 0;
}
コード例 #2
0
void init_kinect() {
	//initialize the UART
	MSS_UART_init(&g_mss_uart0, MSS_UART_57600_BAUD, MSS_UART_DATA_8_BITS | MSS_UART_NO_PARITY | MSS_UART_ONE_STOP_BIT );

	//set irq handler for image data
	MSS_UART_set_rx_handler(&g_mss_uart0, kinect_data_handler, MSS_UART_FIFO_FOUR_BYTES);
}
コード例 #3
0
ファイル: UARTCommandConsole.c プロジェクト: vstehle/FreeRTOS
static void prvConfigureUART( void )
{
	/* Initialise the UART which is used for printf() and CLI IO. */
	MSS_UART_init( ( mss_uart_instance_t * ) pxUART, MSS_UART_115200_BAUD, MSS_UART_DATA_8_BITS | MSS_UART_NO_PARITY | MSS_UART_ONE_STOP_BIT );

	/* Characters are only ever received slowly on the CLI so it is ok to pass
	received characters from the UART interrupt to the task on a queue.  Create
	the queue used for that purpose. */
	xRxedChars = xQueueCreate( cmdRXED_CHARS_QUEUE_LENGTH, sizeof( char ) );

	/* The interrupt handler makes use of FreeRTOS API functions, so its
	priority must be at or below the configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY
	setting (the higher the numeric priority, the lower the logical priority). */
	NVIC_SetPriority( xUART_IRQ, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );

	/* Set the UART Rx notification function. */
	MSS_UART_set_rx_handler( ( mss_uart_instance_t * ) pxUART, prvUARTRxNotificationHandler, MSS_UART_FIFO_SINGLE_BYTE );
}
コード例 #4
0
int xbee_interface_init() {
  int check;
  check = _xbee_interface_alloc_init();
  if (check < 0) return check;

  MSS_GPIO_config(MSS_GPIO_5, MSS_GPIO_OUTPUT_MODE);
  MSS_GPIO_set_output(MSS_GPIO_5, 0x0);
  MSS_GPIO_set_output(MSS_GPIO_5, 0x1);

  MSS_UART_init(&g_mss_uart1,
                MSS_UART_57600_BAUD,
                MSS_UART_DATA_8_BITS | MSS_UART_NO_PARITY | MSS_UART_ONE_STOP_BIT);

  _xbee_interface_rx_init();
  _xbee_interface_tx_init();

  return 0;
}
コード例 #5
0
ファイル: debug.c プロジェクト: frankzzcn/M2_SE_RTOS_Project
void debugInit(uint32_t baudrate)
{
   //Initialize UART0
   MSS_UART_init(&g_mss_uart0, MSS_UART_115200_BAUD,
      MSS_UART_DATA_8_BITS | MSS_UART_NO_PARITY | MSS_UART_ONE_STOP_BIT);
}