- This topic has 0 replies, 1 voice, and was last updated 2 weeks, 2 days ago by
Logan Moon.
-
AuthorPosts
-
February 6, 2025 at 10:32 pm #16836
(This message was transferred over from our old forum)
Posted August 19, 2015
By Todd DeBoer
[hr]
On 5/29/12 Jaybee asked, “I am new to uEZ v2.00, never had the chance to use the uEZ v1.12b. I am wondering if the documentations for uEZ v1.12b is valid for v2.00?In the uEZing blog, there stated a UEZPlatform_Serial0_Require() which will setup the serial drivers, but I cannot locate this function.
Please help to clarify my confusion. thank you.”
[hr]
(Follow up post)Answered:
There may be a typo in the uEZ Blog. The serial0 is called UART0 currently in the platform files. The file uEZPlatform.h in that platform lists all the routines that are in the platform implementation. In the end, you have to check out the appropriate platform .c file in /uEZ/Source/Platform/FDI/…
On top of that, the current platform files only have require routines for the different UARTS for the console. An oversight on my part, but I can provide you the missing code to open up another serial stream. Here is an example I added recently the bottom of a LPC2478 implementation:
void UEZPlatform_UART0_FullDuplex_Require(
TUInt32 aWriteBufferSize,
TUInt32 aReadBufferSize)
{
DEVICE_CREATE_ONCE();
// UART0 on P0.2/P0.3
LPC2478_GPIO0_Require();
LPC2478_UART0_Require(GPIO_P0_2, GPIO_P0_3);
Serial_Generic_FullDuplex_Stream_Create(“UART0”, “UART0”,
aWriteBufferSize, aReadBufferSize);
}void UEZPlatform_UART1_FullDuplex_Require(
TUInt32 aWriteBufferSize,
TUInt32 aReadBufferSize)
{
DEVICE_CREATE_ONCE();
// UART1 on P0.15/P0.16
LPC2478_GPIO0_Require();
LPC2478_UART1_Require(GPIO_P0_15, GPIO_P0_16, GPIO_NONE, GPIO_NONE,
GPIO_NONE, GPIO_NONE, GPIO_NONE, GPIO_NONE);
Serial_Generic_FullDuplex_Stream_Create(“UART1”, “UART1”,
aWriteBufferSize, aReadBufferSize);
}void UEZPlatform_UART2_FullDuplex_Require(
TUInt32 aWriteBufferSize,
TUInt32 aReadBufferSize)
{
DEVICE_CREATE_ONCE();
// UART2 on P0.10/P0.11
LPC2478_GPIO0_Require();
LPC2478_UART2_Require(GPIO_P0_10, GPIO_P0_11);
Serial_Generic_FullDuplex_Stream_Create(“UART2”, “UART2”,
aWriteBufferSize, aReadBufferSize);
}void UEZPlatform_UART3_FullDuplex_Require(
TUInt32 aWriteBufferSize,
TUInt32 aReadBufferSize)
{
DEVICE_CREATE_ONCE();
// UART3 on P0.0/P0.1
LPC2478_GPIO0_Require();
LPC2478_UART3_Require(GPIO_P0_0, GPIO_P0_1);
Serial_Generic_FullDuplex_Stream_Create(“UART3”, “UART3”,
aWriteBufferSize, aReadBufferSize);
}For the LPC1788, this is generally the same between 2478 and 1788, just need to change the GPIO pins used. Check the routines UEZPlatform_Console_FullDuplex_UART2_Require for very similar examples. Let me know if you have problems and I can help out. We’ve got it on the list for the v2.01 release.
-
AuthorPosts
- You must be logged in to reply to this topic.