Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  icssg_queues.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
/* ICSSG Buffer queue helpers
 *
 * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com
 */


#include <linux/regmap.h>
#include "icssg_prueth.h"

#define ICSSG_QUEUES_MAX  64
#define ICSSG_QUEUE_OFFSET  0xd00
#define ICSSG_QUEUE_PEEK_OFFSET  0xe00
#define ICSSG_QUEUE_CNT_OFFSET  0xe40
#define ICSSG_QUEUE_RESET_OFFSET 0xf40

int icssg_queue_pop(struct prueth *prueth, u8 queue)
{
 u32 val, cnt;

 if (queue >= ICSSG_QUEUES_MAX)
  return -EINVAL;

 regmap_read(prueth->miig_rt, ICSSG_QUEUE_CNT_OFFSET + 4 * queue, &cnt);
 if (!cnt)
  return -EINVAL;

 regmap_read(prueth->miig_rt, ICSSG_QUEUE_OFFSET + 4 * queue, &val);

 return val;
}
EXPORT_SYMBOL_GPL(icssg_queue_pop);

void icssg_queue_push(struct prueth *prueth, int queue, u16 addr)
{
 if (queue >= ICSSG_QUEUES_MAX)
  return;

 regmap_write(prueth->miig_rt, ICSSG_QUEUE_OFFSET + 4 * queue, addr);
}
EXPORT_SYMBOL_GPL(icssg_queue_push);

u32 icssg_queue_level(struct prueth *prueth, int queue)
{
 u32 reg;

 if (queue >= ICSSG_QUEUES_MAX)
  return 0;

 regmap_read(prueth->miig_rt, ICSSG_QUEUE_CNT_OFFSET + 4 * queue, ®);

 return reg;
}

Messung V0.5
C=95 H=95 G=94

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge