| 3096 | // ----- CLI Command Functions ----- |
| 3097 | |
| 3098 | void cliFunc_pixelList( char* args ) |
| 3099 | { |
| 3100 | print( NL ); // No \r\n by default after the command is entered |
| 3101 | |
| 3102 | char* curArgs; |
| 3103 | char* arg1Ptr; |
| 3104 | char* arg2Ptr = args; |
| 3105 | |
| 3106 | // Process argument if given |
| 3107 | curArgs = arg2Ptr; |
| 3108 | CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr ); |
| 3109 | |
| 3110 | // Check for special args |
| 3111 | switch ( *arg1Ptr ) |
| 3112 | { |
| 3113 | case 'b': |
| 3114 | case 'B': |
| 3115 | info_print("Buffer List"); |
| 3116 | |
| 3117 | // List all buffers |
| 3118 | for ( uint8_t buf = 0; buf < Pixel_BuffersLen_KLL; buf++ ) |
| 3119 | { |
| 3120 | print( NL "\t" ); |
| 3121 | printInt8( buf ); |
| 3122 | print(":"); |
| 3123 | printHex32( (uint32_t)(uintptr_t)(Pixel_Buffers[ buf ].data) ); |
| 3124 | print(":width("); |
| 3125 | printInt8( Pixel_Buffers[ buf ].width ); |
| 3126 | print("):size("); |
| 3127 | printInt8( Pixel_Buffers[ buf ].size ); |
| 3128 | print(")"); |
| 3129 | } |
| 3130 | break; |
| 3131 | |
| 3132 | default: |
| 3133 | info_print("Pixel List - <num>[<ch1>,...]<width>:..."); |
| 3134 | |
| 3135 | // List all pixels |
| 3136 | for ( uint16_t pixel = 0; pixel < Pixel_TotalPixels_KLL; pixel++ ) |
| 3137 | { |
| 3138 | // NL occaisionally |
| 3139 | if ( pixel % 5 == 0 ) |
| 3140 | print( NL ); |
| 3141 | |
| 3142 | PixelElement *elem = (PixelElement*)&Pixel_Mapping[ pixel ]; |
| 3143 | |
| 3144 | if ( elem->channels == 0 ) |
| 3145 | continue; |
| 3146 | |
| 3147 | printInt16( pixel ); |
| 3148 | print(":"); |
| 3149 | printInt8( elem->width ); |
| 3150 | print("["); |
| 3151 | |
| 3152 | // Display each of the channels |
| 3153 | printInt16( elem->indices[0] ); |
| 3154 | for ( uint8_t ch = 1; ch < elem->channels; ch++ ) |
| 3155 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…