Comments (1)
Here's a small microblaze c code to send over the UART the 0x55 value and then 0x55 and 0xAA, I will soon do a pull request of the project to add further explanation.
#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xparameters.h"
#include "xuartlite.h"
#include "uart_axifull.h"
#define UART_DEVICE_ID XPAR_AXI_UARTLITE_0_DEVICE_ID
#define UART_FULL_BASE8ADDR 0x44A10000
#define UART_FULL_MEMORY_BASE_ADDR 0x76000000
#define UART_FULL_DEVICE_ID XPAR_UART_AXIFULL_0_DEVICE_ID
XUartLite UartNs550;
int main()
{
init_platform();
int Status;
u8 chaine[4] = {0x55,0x01,0xAA,0x55};
Status = XUartLite_Initialize(&UartNs550,UART_DEVICE_ID);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
XUartLite_Send(&UartNs550,&chaine[0], 1);
XUartLite_Send(&UartNs550,&chaine[1], 1);
XUartLite_Send(&UartNs550,&chaine[2], 1);
XUartLite_Send(&UartNs550,&chaine[3], 1);
UART_AXIFULL_mWriteMemory(UART_FULL_MEMORY_BASE_ADDR, chaine[0]);
UART_AXIFULL_mWriteMemory(UART_FULL_MEMORY_BASE_ADDR+1, chaine[2]);
/* TESTING UARTFULL */
UART_AXIFULL_mWriteReg(UART_FULL_BASE8ADDR, UART_AXIFULL_S00_AXI_SLV_REG0_OFFSET, 1);
UART_AXIFULL_mWriteReg(UART_FULL_BASE8ADDR, UART_AXIFULL_S00_AXI_SLV_REG1_OFFSET, 0x00000000);
UART_AXIFULL_mWriteReg(UART_FULL_BASE8ADDR, UART_AXIFULL_S00_AXI_SLV_REG1_OFFSET, 0x000000BA);
/* TESTING UARTFULL */
UART_AXIFULL_mWriteReg(UART_FULL_BASE8ADDR, UART_AXIFULL_S00_AXI_SLV_REG0_OFFSET, 2);
UART_AXIFULL_mWriteReg(UART_FULL_BASE8ADDR, UART_AXIFULL_S00_AXI_SLV_REG1_OFFSET, 0x00000000);
UART_AXIFULL_mWriteReg(UART_FULL_BASE8ADDR, UART_AXIFULL_S00_AXI_SLV_REG1_OFFSET, 0x000000BA);
cleanup_platform();
return 0;
}
from apis_anatolia.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apis_anatolia.