示例#1
0
文件: main.c 项目: sunkaizhu/zephyr
void main(void)
{
	int rv, i;
	struct device *ipm;

	TC_START("Test IPM");
	ipm = device_get_binding("ipm_dummy0");

	/* Try sending a raw string to the IPM device to show that the
	 * receiver works
	 */
	for (i = 0; i < strlen(thestr); i++) {
		ipm_send(ipm, 1, thestr[i], NULL, 0);
	}

	/* Now do this through printf() to exercise the sender */
	printf("Lorem ipsum dolor sit amet, consectetur adipiscing elit, "
	       "sed do eiusmod tempor incididunt ut labore et dolore magna "
	       "aliqua. Ut enim ad minim veniam, quis nostrud exercitation "
	       "ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis "
	       "aute irure dolor in reprehenderit in voluptate velit esse "
	       "cillum dolore eu fugiat nulla pariatur. Excepteur sint "
	       "occaecat cupidatat non proident, sunt in culpa qui officia "
	       "deserunt mollit anim id est laborum.\n");

	/* XXX how to tell if something was actually printed out for
	 * automation purposes?
	 */

	rv = TC_PASS;
	TC_END_RESULT(rv);
	TC_END_REPORT(rv);
}
示例#2
0
文件: main.c 项目: bboozzoo/zephyr
static void alarm_handler(struct device *dev)
{
	/* Unblock LMT application thread. */
	k_fifo_put(&fifo, NULL);

	/* Send a dummy message to ARC so the ARC application
	 * thread can be unblocked.
	 */
	ipm_send(ipm, 0, 0, NULL, 0);
}
示例#3
0
static int consoleOut(int character)
{
	if (character == '\r') {
		return character;
	}

	/*
	 * We just stash the character into the id field and don't supply
	 * any extra data
	 */
	ipm_send(ipm_console_device, 1, character, NULL, 0);

	return character;
}
示例#4
0
static void aon_gpio_callback(struct device *port,
			      struct gpio_callback *cb, uint32_t pins)
{
	ipm_send(ipm, 0, 0, NULL, 0);
}