gram.test.test_core_multiplexer: Add test for _Steerer (fixing #7)
[gram.git] / libgram / README.md
index b7b3f8167e664ab417a525277c22f00d8611c6e6..41a8b48a783e43121d0e49b3c327d220a2953b0d 100644 (file)
@@ -1,6 +1,6 @@
 # libgram, the C companion for gram
 
-libgram is the C library for gram core initialization and memory testing.
+libgram is the C library for gram core initialization and calibration.
 
 ## HowTo
 
@@ -11,7 +11,14 @@ Build libgram with make. In your firmware:
 
 int main(void) {
        struct gramCtx ctx;
-       int err = gram_init(&ctx, 0x10000000, 0x00006000, 0x00005000);
+       struct gramProfile profile {
+               .mode_registers = {
+                       0x320, 0x6, 0x200, 0
+               },
+               .rdly_p0 = 0,
+               .rdly_p1 = 0
+       };
+       int err = gram_init(&ctx, &profile, 0x10000000, 0x00006000, 0x00005000);
 
        return 0;
 }
@@ -24,11 +31,12 @@ Link it to this library and you should be good to go!
 ```
 GRAM_ERR_NONE: No error happened (hardcoded to zero)
 GRAM_ERR_UNDOCUMENTED: Undocumented error, shame on us lazy coders (take a look at the code)
+GRAM_ERR_RDLY_MAX: Read delay calibration unsuccessful because its value exceeds DQSBUFM's max
 ```
 
-## Using libgram when you can't directly access the bus
+## Using libgram outside the SoC
 
-Compile libgram with `CFLAGS="-DGRAM_RW_FUNC"` (run `make clean` beforehand) then define the following functions:
+Compile libgram with `CFLAGS="-DGRAM_RW_FUNC"` (run `make clean` beforehand) and define the following bus access functions:
 
 ```c
 uint32_t gram_read(struct gramCtx *ctx, void *addr);